conversion to 1D array of specified dtype

Aug. 31, 2010
8:57 a.m.
Hello list, What is the easiest way to convert a function argument to at least a 1D array of specified dtype? atleast_1d(3,dtype='d') doesn't work (numpy 1.3.0) array(atleast_1d(3),dtype='d') works but seems cumbersome Thanks, Mark

August 2010
1:20 p.m.
On Tue, Aug 31, 2010 at 3:57 AM, Mark Bakker <markbak@gmail.com> wrote:
Hello list,
What is the easiest way to convert a function argument to at least a 1D array of specified dtype?
atleast_1d(3,dtype='d') doesn't work (numpy 1.3.0)
array(atleast_1d(3),dtype='d') works but seems cumbersome
atleast_1d(d).astype('d') Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
5288
Age (days ago)
5288
Last active (days ago)
1 comments
2 participants
participants (2)
-
Mark Bakker
-
Ryan May