Skip to content

Commit

Permalink
Update numpy requirement from <=1.26.4 to <=2.0.0 (#225)
Browse files Browse the repository at this point in the history
* Update numpy requirement from <=1.26.4 to <=2.0.0

Updates the requirements on [numpy](https://github.com/numpy/numpy) to permit the latest version.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](numpy/numpy@v0.2.0...v2.0.0)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* remove np.float_

* remove np.float_

* remove np.float_

* remove np.float_

* remove np.float_

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: nanne-aben <47976799+nanne-aben@users.noreply.github.com>
dependabot[bot] and nanne-aben authored Jun 25, 2024

Verified

This commit was signed with the committer’s verified signature.
ewdurbin Ee Durbin
1 parent d73132d commit 1934cb4
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 2 additions & 4 deletions docs/source/deepdive_into_dtypes.ipynb
Original file line number Diff line number Diff line change
@@ -59,8 +59,8 @@
"metadata": {},
"outputs": [],
"source": [
"assert df.dtypes[\"a\"] == np.int_\n",
"assert df.dtypes[\"b\"] == np.float_\n",
"assert df.dtypes[\"a\"] == np.int64\n",
"assert df.dtypes[\"b\"] == np.float64\n",
"assert df.dtypes[\"c\"] == np.bool_"
]
},
@@ -136,13 +136,11 @@
"source": [
"class Schema:\n",
" a: np.integer\n",
" b: np.float_\n",
"\n",
"\n",
"df = DataSet[Schema](\n",
" {\n",
" \"a\": pd.Series([1, 2, 3], dtype=np.int64),\n",
" \"b\": pd.Series([1.0, 2.0, 3.0], dtype=np.float64),\n",
" }\n",
")\n",
"df.dtypes"
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
numpy<=1.26.4
numpy<=2.0.0
pandas<=2.2.2
pandas-stubs<=2.2.2.240603
10 changes: 5 additions & 5 deletions tests/test_type_validation.py
Original file line number Diff line number Diff line change
@@ -58,14 +58,14 @@ def check_list_of_types(observed, expected_to_match, expected_to_fail):


def test_numeric_base_python_types():
check_list_of_types(int, [np.int64, np.int_, int], [float, np.float_])
check_list_of_types(float, [np.float64, np.float_, float], [int, np.int_])
check_list_of_types(int, [np.int64, np.int_, int], [float, np.float64])
check_list_of_types(float, [np.float64, float], [int, np.int_])
check_list_of_types(bool, [np.bool_, bool], [int, np.int_])


def test_numpy_types():
check_list_of_types(np.int64, [np.int64, np.int_, int], [float, np.float_])
check_list_of_types(np.float64, [np.float64, np.float_, float], [int, np.int_])
check_list_of_types(np.int64, [np.int64, np.int_, int], [float, np.float64])
check_list_of_types(np.float64, [np.float64, float], [int, np.int_])
check_list_of_types(np.bool_, [np.bool_, bool], [int, np.int_])
check_list_of_types(
np.datetime64, [np.datetime64], [np.timedelta64, DatetimeTZDtype(tz="UTC"), np.int_]
@@ -126,7 +126,7 @@ def test_supported_index_data_type():
int,
float,
np.int_,
np.float_,
np.float64,
np.datetime64,
np.timedelta64,
Any,

0 comments on commit 1934cb4

Please sign in to comment.