[Numpy-discussion] Defining custom types

David Douard david.douard at logilab.fr
Fri Nov 17 03:40:54 EST 2006


On Thu, Nov 16, 2006 at 01:28:25PM -0600, Jonathan Wang wrote:
> Hi all,
> 
> I've gotten to the point where Numpy recognizes the objects (represented as
> doubles), but I haven't figured out how to register ufunc loops on the
> custom type. It seems like Numpy should be able to check that the scalarkind
> variable in the numpy type descriptor is set to float and use the float
> ufuncs on the custom object. Barring that, does anyone know if the symbols
> for the ufuncs are publicly accessible (and where they are) so that I can
> register them with Numpy on the custom type?
> 
> As for sharing code, I've been working on this for a project at work. There
> is a possibility that it will be released to the Numpy community, but that's
> not clear yet.

Hi,
besides the fact that there seem to have several people interested in
this piece of code, I'm pretty sure some of us might help you with this
code. 
Maybe you should tell your employer how far your project
could benefits from being released to the numpy community (at least this
part of the project) ;-)


> 
> Thanks,
> Jonathan
> 
> On 11/16/06, Matt Knox <mattknox_ca at hotmail.com> wrote:
> >
> >> On Thursday 16 November 2006 11:44, David Douard wrote:
> >> > Hi, just to ask you: how is the work going on encapsulatinsg
> >mx.DateTime
> >> > as a native numpy type?
> >> > And most important: is the code available somewhere? I am also
> >> > interested in using DateTime objects in numpy arrays. For now, I've
> >> > always used arrays of floats (using gmticks values of dates).
> >
> >> And I, as arrays of objects (well, I wrote a subclass to deal with
> >dates,
> >> where each element is a datetime object, with methods to translate to
> >floats
> >> or strings , but it's far from optimal...). I'd also be quite interested
> >in
> >> checking what has been done.
> >
> >I'm also very interested in the results of this. I need to do something
> >very similar and am currently relying on an ugly hack to achieve the 
> >desired
> >result.
> >
> >- Matt Knox
> >
> >-------------------------------------------------------------------------
> >Take Surveys. Earn Cash. Influence the Future of IT
> >Join SourceForge.net's Techsay panel and you'll get the chance to share
> >your
> >opinions on IT & business topics through brief surveys - and earn cash
> >http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> >_______________________________________________
> >Numpy-discussion mailing list
> >Numpy-discussion at lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/numpy-discussion
> >
> >
> >

> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion


-- 
David Douard                             LOGILAB, Paris (France)
Formations Python, Zope, Plone, Debian : http://www.logilab.fr/formations
Développement logiciel sur mesure :      http://www.logilab.fr/services
Informatique scientifique :              http://www.logilab.fr/science
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20061117/cbcbdae0/attachment.sig>


More information about the NumPy-Discussion mailing list