diff options
author | Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> | 2021-10-07 14:29:40 +0200 |
---|---|---|
committer | Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com> | 2023-02-10 00:06:49 +0100 |
commit | 75af40548eb85cfa25cb4074e9e4ebc5d5196b4e (patch) | |
tree | 9f5a39dd6cc62b66bb3753439003245960294350 /numpy/typing | |
parent | ac6e66b9b22adcf1d72750ccb8ffe70be87c3679 (diff) | |
download | numpy-75af40548eb85cfa25cb4074e9e4ebc5d5196b4e.tar.gz |
MAINT, DOC: string_ → bytes_ and unicode_ → str_
Diffstat (limited to 'numpy/typing')
-rw-r--r-- | numpy/typing/tests/data/pass/dtype.py | 2 | ||||
-rw-r--r-- | numpy/typing/tests/data/pass/numerictypes.py | 4 | ||||
-rw-r--r-- | numpy/typing/tests/data/pass/simple.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/numpy/typing/tests/data/pass/dtype.py b/numpy/typing/tests/data/pass/dtype.py index e849cfdd4..6ec44e6b0 100644 --- a/numpy/typing/tests/data/pass/dtype.py +++ b/numpy/typing/tests/data/pass/dtype.py @@ -15,7 +15,7 @@ np.dtype({"names": ["a", "b"], "formats": [int, float]}) np.dtype({"names": ["a"], "formats": [int], "titles": [object]}) np.dtype({"names": ["a"], "formats": [int], "titles": [object()]}) -np.dtype([("name", np.unicode_, 16), ("grades", np.float64, (2,)), ("age", "int32")]) +np.dtype([("name", np.str_, 16), ("grades", np.float64, (2,)), ("age", "int32")]) np.dtype( { diff --git a/numpy/typing/tests/data/pass/numerictypes.py b/numpy/typing/tests/data/pass/numerictypes.py index 7f1dd0945..ab86f590d 100644 --- a/numpy/typing/tests/data/pass/numerictypes.py +++ b/numpy/typing/tests/data/pass/numerictypes.py @@ -8,7 +8,7 @@ np.issctype("S8") np.obj2sctype(list) np.obj2sctype(list, default=None) -np.obj2sctype(list, default=np.string_) +np.obj2sctype(list, default=np.bytes_) np.issubclass_(np.int32, int) np.issubclass_(np.float64, float) @@ -17,7 +17,7 @@ np.issubclass_(np.float64, (int, float)) np.issubsctype("int64", int) np.issubsctype(np.array([1]), np.array([1])) -np.issubdtype("S1", np.string_) +np.issubdtype("S1", np.bytes_) np.issubdtype(np.float64, np.float32) np.sctype2char("S1") diff --git a/numpy/typing/tests/data/pass/simple.py b/numpy/typing/tests/data/pass/simple.py index 03ca3e83f..801168702 100644 --- a/numpy/typing/tests/data/pass/simple.py +++ b/numpy/typing/tests/data/pass/simple.py @@ -33,13 +33,13 @@ np.dtype(two_tuples_dtype) three_tuples_dtype = [("R", "u1", 2)] np.dtype(three_tuples_dtype) -mixed_tuples_dtype = [("R", "u1"), ("G", np.unicode_, 1)] +mixed_tuples_dtype = [("R", "u1"), ("G", np.str_, 1)] np.dtype(mixed_tuples_dtype) shape_tuple_dtype = [("R", "u1", (2, 2))] np.dtype(shape_tuple_dtype) -shape_like_dtype = [("R", "u1", (2, 2)), ("G", np.unicode_, 1)] +shape_like_dtype = [("R", "u1", (2, 2)), ("G", np.str_, 1)] np.dtype(shape_like_dtype) object_dtype = [("field1", object)] |