From: Travis O. <oli...@ie...> - 2006-10-16 18:32:15
|
Charles R Harris wrote: > It seems to me that since the behaviour when copy=0 is to make a copy > only if necessary, it should find it necessary and make the downcast. > After all, array(a, dtype=single, copy=1) does just that without > complaint. Some common code in linalg could be replaced if array and > asarray would do that operation. > Well, the fact that it makes the copy without raising an error is different behavior from Numeric and should be considered an unintended change. We definitely should make this consistent for copy=0 or copy=1. The only question, is do we raise the error in both cases or allow the conversion in both cases. The long-standing behavior is to raise the error on possible-loss conversion and so my opinion is that we should continue with that behavior. -Travis |