diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 27223735..b17d2542 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,6 +14,13 @@ jobs: matrix: python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] architecture: ["x64"] + include: + - python-version: 3.9 + numpy-version: "2.0.dev" + - python-version: 3.10 + numpy-version: "2.0.dev" + - python-version: 3.11 + numpy-version: "2.0.dev" steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python-version }} on ${{ matrix.architecture }} @@ -37,6 +44,9 @@ jobs: - name: Install dependencies if: matrix.python-version != 3.7 run: pip install -r requirements-dev.txt + - name: Install Numpy Dev + if: ${{ matrix.numpy-version }} + run: pip install -I --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple "numpy>=0.0.dev0" - name: Lint with flake8 if: matrix.python-version == 3.11 run: | diff --git a/deepdiff/helper.py b/deepdiff/helper.py index cec24f38..29efe0bd 100644 --- a/deepdiff/helper.py +++ b/deepdiff/helper.py @@ -64,11 +64,11 @@ class pydantic_base_model_type: np_uintp = np.uintp np_float32 = np.float32 np_float64 = np.float64 - np_float_ = np.float_ + np_float_ = np.double # np.float_ is an alias for np.double and is being removed by NumPy 2.0 np_floating = np.floating np_complex64 = np.complex64 np_complex128 = np.complex128 - np_complex_ = np.complex_ + np_complex_ = np.cdouble # np.complex_ is an alias for np.cdouble and is being removed by NumPy 2.0 np_complexfloating = np.complexfloating numpy_numbers = ( @@ -655,7 +655,7 @@ def diff_numpy_array(A, B): By Divakar https://stackoverflow.com/a/52417967/1497443 """ - return A[~np.in1d(A, B)] + return A[~np.isin(A, B)] PYTHON_TYPE_TO_NUMPY_TYPE = {