remove import failure · mattip/pandas@279fdf6 (original) (raw)
`@@ -3236,7 +3236,7 @@ def comp(s):
`
3236
3236
`return _possibly_compare(values, getattr(s, 'asm8', s),
`
3237
3237
`operator.eq)
`
3238
3238
``
3239
``
`-
def _cast(block, scalar):
`
``
3239
`+
def _cast_scalar(block, scalar):
`
3240
3240
`dtype, val = _infer_dtype_from_scalar(scalar, pandas_dtype=True)
`
3241
3241
`if not is_dtype_equal(block.dtype, dtype):
`
3242
3242
`dtype = _find_common_type([block.dtype, dtype])
`
`@@ -3268,7 +3268,7 @@ def _cast(block, scalar):
`
3268
3268
`# particular block
`
3269
3269
`m = masks[i][b.mgr_locs.indexer]
`
3270
3270
`if m.any():
`
3271
``
`-
b, val = _cast(b, d)
`
``
3271
`+
b, val = _cast_scalar(b, d)
`
3272
3272
`new_rb.extend(b.putmask(m, val, inplace=True))
`
3273
3273
`else:
`
3274
3274
`new_rb.append(b)
`