Hi, I am sorry if I have missed anything obvious here, but is there a fast simple way to downcast an array to the smallest storage that hold array data within a specified precision - e.g.
a = array([1.0]) small_a = fantasy_function(a, rtol=1.0000000000000001e-05, atol=1e-08 ) b = array([1.2]) small_b = fantasy_function(b, tol=1.0000000000000001e-05, atol=1e-08) where a.dtype becomes, say, uint8, and b.dtype becomes float32? Thanks a lot, Matthew ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion