<br><br><div class="gmail_quote">On Thu, May 10, 2012 at 12:52 PM, Scott Ransom <span dir="ltr"><<a href="mailto:sransom@nrao.edu" target="_blank">sransom@nrao.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 05/10/2012 02:23 PM, Chris Barker wrote:<br>
> On Thu, May 10, 2012 at 2:38 AM, Dag Sverre Seljebotn<br>
> <<a href="mailto:d.s.seljebotn@astro.uio.no">d.s.seljebotn@astro.uio.no</a>>  wrote:<br>
>> What would serve me? I use NumPy as a glorified "double*".<br>
><br>
>> all I want is my glorified<br>
>> "double*". I'm probably not a representative user.)<br>
><br>
> Actually, I think you are representative of a LOT of users -- it<br>
> turns, out, whether Jim Huginin originally was thinking this way or<br>
> not, but numpy arrays are really powerful because the provide BOTH and<br>
> nifty, full featured array object in Python, AND a wrapper around a<br>
> generic "double*" (actually char*, that could be any type).<br>
><br>
> This is are really widely used feature, and has become even more so<br>
> with Cython's numpy support.<br>
><br>
> That is one of my concerns about the "bit pattern" idea -- we've then<br>
> created a new binary type that no other standard software understands<br>
> -- that looks like a a lot of work to me to deal with, or even worse,<br>
> ripe for weird, non-obvious errors in code that access that good-old<br>
> char*.<br>
><br>
> So I'm happier with a mask implementation -- more memory, yes, but it<br>
> seems more robust an easy to deal with with outside code.<br>
><br>
> But either way, Dag's key point is right on -- in Cython (or any other<br>
> code) -- we need to make sure ti's easy to get a regular old pointer<br>
> to a regular old C array, and get something else by accident.<br>
><br>
> -Chris<br>
<br>
</div>Agreed.  (As someone who has been heavily using Numpy since the early<br>
days of numeric, and who wrote and maintains a suite of scientific<br>
software that uses Numpy and its C-API in exactly this way.)<br>
<br>
Note that I wasn't aware that the proposed mask implementation might (or<br>
would?) change this behavior...  (and hopefully I haven't just<br>
misinterpreted these last few emails.  If so, I apologize.).<br>
<br></blockquote><div><br>I haven't seen a change in this behavior, otherwise most of current numpy would break.<br><br>Chuck <br></div><br></div>