Re: [Numpy-discussion] Bug or feature ?
Jan. 24, 2005
7:31 a.m.
On Mon, 2005-01-24 at 16:15 +0100, Jean-Luc Menut wrote:
Hello,
numarray and Numeric, consciously, don't work that way. So, no, you can't expect that.
rank-0 yes, silent truncation no.
I'm sorry, I don't understand very well what is a silent truncation.
By silent truncation, I mean the fact that 1.1 is floored to 1 without an exception or warning.
When I write :
a = array([[1, 2],[3, 4]])
a[0,0]=1.1
I cannot expect to have a = array([[1.1, 2],[3, 4]]) ?
This works and the result will be a Float64 array containing 1.1, 2.0, ...
How can I solve this problem ? is it possible to force an array to be an array of float ?
Sure. For numarray or Numeric: a = array([[1, 2],[3, 4]], typecode=Float64)
7810
Age (days ago)
7810
Last active (days ago)
0 comments
1 participants
participants (1)
-
Todd Miller