Skip to content

Conversation

@jbrockmendel
Copy link
Member

There's nothing about this that particularly benefits from being in cython (I think until recently this was used within index.pyx) and its clearer in python. Plus we get a slightly smaller/faster build.

return _putmask_preserve(v, n)


def _convert_scalar_for_putitemlike(scalar, dtype: np.dtype):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe in pandas.core.dtypes.cast ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. With convert_scalar out of libindex, we can move validate_numeric_casting to core.dtypes.cast as well (and after #31662 we'll be able to get rid of libindex.get_value_at, plus util.get_value_at and util.validate_indexer!)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm.

@jreback jreback added the Dtype Conversions Unexpected or buggy dtype conversions label Feb 5, 2020
@jreback
Copy link
Contributor

jreback commented Feb 5, 2020

needs a rebase as well

@jreback jreback added this to the 1.1 milestone Feb 5, 2020
@jreback
Copy link
Contributor

jreback commented Feb 5, 2020

ping on green.

@jbrockmendel
Copy link
Member Author

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Dtype Conversions Unexpected or buggy dtype conversions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants