You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# we may need to manually
# broadcast a 1 element array
if yrav.shape != mask.shape:
yrav = np.empty(mask.shape, dtype=yrav.dtype)
yrav.fill(yrav.item())
Getting yrav.item() in the last line here after re-defining yrav in the previous line seems like it is likely getting the wrong thing. Is this intentional?
The text was updated successfully, but these errors were encountered:
It looks like in the tests this branch is only hit in py3 and in one test:
s = Series([2, 3, 4, 5, 6, 7, 8, 9, datetime(2005, 1, 1)])
s[::2] = np.nan
d = DataFrame({'A': s})
with pytest.raises(ValueError):
d.__and__(s, axis='columns')
... and the reason why a ValueError is raised ATM is because the call to yrav.item() raises ValueError: can only convert an array of size 1 to a Python scalar
So still not sure what's going on, but increasingly confident this isn't how it is supposed to work.
https://github.com/pandas-dev/pandas/blob/master/pandas/core/ops.py#L1030
Getting
yrav.item()
in the last line here after re-definingyrav
in the previous line seems like it is likely getting the wrong thing. Is this intentional?The text was updated successfully, but these errors were encountered: