numpy.asfarray(a,dtype=<class 'numpy.float64'>)[source]¶Return an array converted to a float type.
| Parameters: |
|
|---|---|
| Returns: |
|
Examples
>>>np.asfarray([2,3])array([ 2., 3.])>>>np.asfarray([2,3],dtype='float')array([ 2., 3.])>>>np.asfarray([2,3],dtype='int8')array([ 2., 3.])