Skip to content

Commit ad86efc

Browse files
authored
CLN: remove compat checks (#53441)
1 parent e511f08 commit ad86efc

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

pandas/_libs/lib.pyx

+3-17
Original file line numberDiff line numberDiff line change
@@ -1192,9 +1192,12 @@ _TYPE_MAP = {
11921192
"u": "integer",
11931193
"float32": "floating",
11941194
"float64": "floating",
1195+
"float128": "floating",
1196+
"float256": "floating",
11951197
"f": "floating",
11961198
"complex64": "complex",
11971199
"complex128": "complex",
1200+
"complex256": "complex",
11981201
"c": "complex",
11991202
"string": "string",
12001203
str: "string",
@@ -1216,23 +1219,6 @@ _TYPE_MAP = {
12161219
bytes: "bytes",
12171220
}
12181221

1219-
# types only exist on certain platform
1220-
try:
1221-
np.float128
1222-
_TYPE_MAP["float128"] = "floating"
1223-
except AttributeError:
1224-
pass
1225-
try:
1226-
np.complex256
1227-
_TYPE_MAP["complex256"] = "complex"
1228-
except AttributeError:
1229-
pass
1230-
try:
1231-
np.float16
1232-
_TYPE_MAP["float16"] = "floating"
1233-
except AttributeError:
1234-
pass
1235-
12361222

12371223
@cython.internal
12381224
cdef class Seen:

pandas/tests/series/indexing/test_setitem.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,7 @@ def is_inplace(self, obj, expected):
688688
"""
689689
Whether we expect the setting to be in-place or not.
690690
"""
691-
try:
692-
return expected.dtype == obj.dtype
693-
except TypeError:
694-
# older numpys
695-
return False
691+
return expected.dtype == obj.dtype
696692

697693
def check_indexer(self, obj, key, expected, val, indexer, is_inplace):
698694
orig = obj

0 commit comments

Comments
 (0)