[Numpy-discussion] Assigning complex values to a real array
Charles R Harris
Thu Dec 10 13:44:41 CST 2009
On Thu, Dec 10, 2009 at 12:34 PM, Pauli Virtanen <firstname.lastname@example.org> wrote:
> to, 2009-12-10 kello 10:18 -0600, Robert Kern kirjoitti:
> > On Thu, Dec 10, 2009 at 04:24, Pauli Virtanen <email@example.com<pav%2Bsp@iki.fi>>
> > > Thu, 10 Dec 2009 09:54:32 +0100, Dag Sverre Seljebotn wrote:
> > > [clip]
> > >> At this point I want to remind us about Charles Harris' very workable
> > >> proposal: Raise a warning. That should both keep backward
> > >> and prevent people from wasting days. (Hopefully, we can avoid wasting
> > >> days discussing this issue too :-) ).
> > >
> > > Yes. We can even make it a PendingDeprecationWarning, when we become
> > > convinced that this feature should go away in entirety.
> > PendingDeprecationWarnings are off by default, I think.
> So it seems.
> r7993 makes Numpy to raise a custom ComplexWarning when these things
> occur. It's easy for the user to change that into an error or silence
You need a small fixup to support python-2.4. For instance, the deprecation
warning is implemented as:
#if PY_VERSION_HEX >= 0x02050000
#define DEPRECATE(msg) PyErr_WarnEx(PyExc_DeprecationWarning,msg,1)
#define DEPRECATE(msg) PyErr_Warn(PyExc_DeprecationWarning,msg)
Thanks for settling this discussion ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion