From: <js...@us...> - 2007-11-08 22:12:02
|
Revision: 4165 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4165&view=rev Author: jswhit Date: 2007-11-08 14:11:50 -0800 (Thu, 08 Nov 2007) Log Message: ----------- specify endian-ness in dtype, instead of using byteswap() Modified Paths: -------------- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-08 22:06:40 UTC (rev 4164) +++ trunk/toolkits/basemap-testing/lib/matplotlib/toolkits/basemap/basemap.py 2007-11-08 22:11:50 UTC (rev 4165) @@ -791,10 +791,8 @@ # read in binary string convert into an npts by 2 # numpy array (first column is lons, second is lats). polystring = bdatfile.read(bytecount) - if not npy.little_endian: - b = npy.reshape(npy.fromstring(polystring,dtype=npy.float64).byteswap(),(npts,2)) - else: - b = npy.reshape(npy.fromstring(polystring,dtype=npy.float64),(npts,2)) + # binary data is little endian. + b = npy.reshape(npy.fromstring(polystring,dtype='<f8'),(npts,2)) # if map boundary polygon is a valid one in lat/lon # coordinates (i.e. it does not contain either pole), # the intersections of the boundary geometries This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |