3 May
2010
3 May
'10
1:13 p.m.
On 5/2/2010 1:51 PM, Gökhan Sever wrote:
The following is another surprise output:
I[5]: c = np.arange(0.4, 0.5, 0.1, dtype='float32') [6]: c O[6]: array([ 0.40000001], dtype=float32)
a = np.array([0.4,0.5,0.1], dtype='float32') a[0] 0.40000001 (a[1]-a[0])/a[2] 0.99999994 np.ceil((a[1]-a[0])/a[2]) 1.0
The docstring states: For floating point arguments, the length of the result is ``ceil((stop - start)/step)``. hth, Alan Isaac