On 05/10/2012 02:23 PM, Chris Barker wrote: > On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn > <d.s.seljeb...@astro.uio.no> wrote: >> What would serve me? I use NumPy as a glorified "double*". > >> all I want is my glorified >> "double*". I'm probably not a representative user.) > > Actually, I think you are representative of a LOT of users -- it > turns, out, whether Jim Huginin originally was thinking this way or > not, but numpy arrays are really powerful because the provide BOTH and > nifty, full featured array object in Python, AND a wrapper around a > generic "double*" (actually char*, that could be any type). > > This is are really widely used feature, and has become even more so > with Cython's numpy support. > > That is one of my concerns about the "bit pattern" idea -- we've then > created a new binary type that no other standard software understands > -- that looks like a a lot of work to me to deal with, or even worse, > ripe for weird, non-obvious errors in code that access that good-old > char*. > > So I'm happier with a mask implementation -- more memory, yes, but it > seems more robust an easy to deal with with outside code. > > But either way, Dag's key point is right on -- in Cython (or any other > code) -- we need to make sure ti's easy to get a regular old pointer > to a regular old C array, and get something else by accident. > > -Chris
Agreed. (As someone who has been heavily using Numpy since the early days of numeric, and who wrote and maintains a suite of scientific software that uses Numpy and its C-API in exactly this way.) Note that I wasn't aware that the proposed mask implementation might (or would?) change this behavior... (and hopefully I haven't just misinterpreted these last few emails. If so, I apologize.). Cheers, Scott -- Scott M. Ransom Address: NRAO Phone: (434) 296-0320 520 Edgemont Rd. email: sran...@nrao.edu Charlottesville, VA 22903 USA GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989 _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion