Skip to content

Commit b29e151

Browse files
committed
Add code annotations and update documentation
1 parent 153086f commit b29e151

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ ExtensionArray
627627
- Bug in :meth:`.arrays.ArrowExtensionArray.__setitem__` which caused wrong behavior when using an integer array with repeated values as a key (:issue:`58530`)
628628
- Bug in :meth:`api.types.is_datetime64_any_dtype` where a custom :class:`ExtensionDtype` would return ``False`` for array-likes (:issue:`57055`)
629629
- Bug in various :class:`DataFrame` reductions for pyarrow temporal dtypes returning incorrect dtype when result was null (:issue:`59234`)
630+
- Bug in :class:`NumpyExtensionArray` where it did not raise any error if validated value to be inserted did not have the same dtype (:issue:`51044`).
630631

631632
Styler
632633
^^^^^^

pandas/core/arrays/numpy_.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def _validate_scalar(self, fill_value):
232232
fill_value = self.dtype.na_value
233233
return fill_value
234234

235-
def _validate_setitem_value(self, value):
235+
def _validate_setitem_value(self, value) -> type(value) | None:
236236
"""
237237
Check if we have a scalar that we can cast losslessly.
238238

0 commit comments

Comments
 (0)