diff options
| author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-04-20 14:22:24 +0200 |
|---|---|---|
| committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-04-20 15:18:14 +0200 |
| commit | e4b10510507d0b4d22e8fa9589a6232889d40fac (patch) | |
| tree | 028b90af2a0c733f243325272e0bfec0226ea6c4 | |
| parent | a25f8b9f964095aebcd2b218586cdf39598c8cf6 (diff) | |
| download | numpy-e4b10510507d0b4d22e8fa9589a6232889d40fac.tar.gz | |
DEP: Remove python 2-specific code
| -rw-r--r-- | numpy/core/numerictypes.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/numpy/core/numerictypes.py b/numpy/core/numerictypes.py index 93af5c95d..467e2ed23 100644 --- a/numpy/core/numerictypes.py +++ b/numpy/core/numerictypes.py @@ -79,7 +79,6 @@ Exported symbols include: \\-> object_ (not used much) (kind=O) """ -import types as _types import numbers import warnings @@ -512,14 +511,7 @@ cast = _typedict() for key in _concrete_types: cast[key] = lambda x, k=key: array(x, copy=False).astype(k) -try: - ScalarType = [_types.IntType, _types.FloatType, _types.ComplexType, - _types.LongType, _types.BooleanType, - _types.StringType, _types.UnicodeType, _types.BufferType] -except AttributeError: - # Py3K - ScalarType = [int, float, complex, int, bool, bytes, str, memoryview] - +ScalarType = [int, float, complex, int, bool, bytes, str, memoryview] ScalarType.extend(_concrete_types) ScalarType = tuple(ScalarType) |
