On Wed, Jan 12, 2011 at 8:20 AM, Bruce Southey <bsouthey@gmail.com> wrote:
On 12/13/2010 04:53 PM, Keith Goodman wrote:
On Mon, Dec 13, 2010 at 12:20 PM, Bruce Southey<bsouthey@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.
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
a = np.array([1,2,3], dtype='float32') bn.median(a).dtype
np.median(a).dtype
I fixed ticket 518 in bottleneck: dtype('float32') dtype('float64') Not sure I would have done that if I knew that numpy has a won't fix on it.