[Numpy-discussion] Datetime branch

Charles R Harris charlesr.harris at gmail.com
Thu Jun 11 13:29:06 EDT 2009

On Thu, Jun 11, 2009 at 10:29 AM, Travis Oliphant <oliphant at enthought.com>wrote:

> On Jun 10, 2009, at 11:18 PM, Charles R Harris wrote:
> Hi Travis,
> I looked through the recent commits to the datetime branch and, as I'm
> working on cleaning up arraytypes I would appreciate it if you can merge up
> your changes there as soon as possible to minimize conflicts. Also, this
> change looks like a reversion of current trunk to something older:
> @@ -2688,10 +2690,8 @@
>          goto err;
>      }
> -    /*
> -     * PyExc_Exception should catch all the standard errors that are
> -     * now raised instead of the string exception "multiarray.error".
> -     * This is for backward compatibility with existing code.
> -     */
> -    PyDict_SetItemString (d, "error", PyExc_Exception);
> +    /* Fixme: we might want to remove this old string exception string */
> +    s = PyString_FromString("multiarray.error");
> +    PyDict_SetItemString (d, "error", s);
> +    Py_DECREF(s);
>      s = PyString_FromString("3.0");
>      PyDict_SetItemString(d, "__version__", s);
> And I am concerned that there might be other such cases.
> There may be.    I took Robert's git branch and tried to re-base it.  But,
> I'm a git neophyte and didn't know what I was doing.   I tried to eliminate
> the most obvious cases where is trunk was out-of-date, but obviously missed
> some.
> Thanks for checking.  I don't want to stomp on your work, but I don't know
> what you mean by cleaning up arraytypes?

Oh, and slipping the new types in between 64 bit integers and floats is a
bit iffy. I've always been a bit bothered by numpy's dependence on the
linear order of the types as it is hard to maintain when new types are
added, and user types don't seem quite adequate. I don't know what we should
do here but it might be worth thinking about some other way of indicating
the relation/priority of the different types.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090611/0ffd0267/attachment.html>

More information about the NumPy-Discussion mailing list