[Numpy-discussion] bug in fromiter - with patch

Russel Howe russel@appliedminds....
Fri Sep 26 19:50:43 CDT 2008


Oops.  I made a last minute change without re-running the tests.  The 
tests refer to np.range, that should just be range.

Corrected test attached.


Russel Howe wrote:
> As of SVN from this morning, fromiter cannot create an array whose dtype 
> is a byte type
> 
> In [1]: np.fromiter(range(10), dtype='b')
> ---------------------------------------------------------------------------
> MemoryError                               Traceback (most recent call last)
> 
> /Users/baxter/<ipython console> in <module>()
> 
> MemoryError: cannot allocate array memory
> 
> 
> I am not sure how to include a test whose failure condition is the 
> raising of an exception, but the patch includes the above test.
> 
> Russel
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://projects.scipy.org/mailman/listinfo/numpy-discussion

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fromiter.patch
Url: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080926/eb12066c/attachment.pl 


More information about the Numpy-discussion mailing list