Skip to content

CLN: remove compat checks #53441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions pandas/_libs/lib.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,12 @@ _TYPE_MAP = {
"u": "integer",
"float32": "floating",
"float64": "floating",
"float128": "floating",
"float256": "floating",
"f": "floating",
"complex64": "complex",
"complex128": "complex",
"complex256": "complex",
"c": "complex",
"string": "string",
str: "string",
Expand All @@ -1216,23 +1219,6 @@ _TYPE_MAP = {
bytes: "bytes",
}

# types only exist on certain platform
try:
np.float128
_TYPE_MAP["float128"] = "floating"
except AttributeError:
pass
try:
np.complex256
_TYPE_MAP["complex256"] = "complex"
except AttributeError:
pass
try:
np.float16
_TYPE_MAP["float16"] = "floating"
except AttributeError:
pass


@cython.internal
cdef class Seen:
Expand Down
6 changes: 1 addition & 5 deletions pandas/tests/series/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,11 +688,7 @@ def is_inplace(self, obj, expected):
"""
Whether we expect the setting to be in-place or not.
"""
try:
return expected.dtype == obj.dtype
except TypeError:
# older numpys
return False
return expected.dtype == obj.dtype

def check_indexer(self, obj, key, expected, val, indexer, is_inplace):
orig = obj
Expand Down