On Tue, Sep 18, 2012 at 6:08 PM, Charles R Harris <charlesr.har...@gmail.com > wrote:
> <snip> > > 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, > > NPY_WARN_SAME_KIND_CASTING > > 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. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion