[Numpy-discussion] Regression: in-place operations (possibly intentional)
Charles R Harris
Tue Sep 18 20:31:27 CDT 2012
On Tue, Sep 18, 2012 at 6:08 PM, Charles R Harris <firstname.lastname@example.org
> The relevant setting is in numpy/core/include/numpy/ndarraytypes.h
> #define NPY_DEFAULT_ASSIGN_CASTING NPY_SAME_KIND_CASTING
> I think that if we want to raise a warning we could define a new rule,
> Which would do the same as unsafe, only raise a warning on the way.
On second thought, it might be easier to set a warn bit on the usual
casting macros, i.e.,
#define NPY_WARN_CASTING 256
#define NPY_MASK_CASTING 255
#define NPY_DEFAULT_ASSIGN_CASTING (NPY_UNSAFE_CASTING | NPY_WARN_CASTING)
and replace the current checks with masked checks.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion