[Numpy-discussion] Output dtype
Bruce Southey
bsouthey at gmail.com
Wed Jan 12 11:20:39 EST 2011
On 12/13/2010 04:53 PM, Keith Goodman wrote:
> On Mon, Dec 13, 2010 at 12:20 PM, Bruce Southey<bsouthey at gmail.com> wrote:
>
>> Unless something has changed since the docstring was written, this is
>> probably an inherited 'bug' from np.mean() as the author expected that
>> the docstring of mean was correct. For my 'old' 2.0 dev version:
>>
>> >>> np.mean( np.array([[0,1,2,3,4,5]], dtype='float32'), axis=1).dtype
>> dtype('float32')
>> >>> np.mean( np.array([[0,1,2,3,4,5]], dtype='float32')).dtype
>> dtype('float64')
> Are you saying the bug is in the doc string, the output, or both? I
> think it is both; I expect the second result above to be float32.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
Sorry as I filed a bug for this as 1710
http://projects.scipy.org/numpy/ticket/1710
but this is the same as ticket 518 that is listed as won't fix:
http://projects.scipy.org/numpy/ticket/518
My expectation is that the internal and output dtypes should not depend
on the axis argument. Related to this, I also think that internal dtypes
should be the same as the output dtype (see ticket 465 regarding the
internal precision http://projects.scipy.org/numpy/ticket/465).
If the consensus is still won't fix then I or someone needs to edit the
documentation to clearly reflect these situations.
Bruce
More information about the NumPy-Discussion
mailing list