From: Mark B. <ma...@gm...> - 2006-10-12 07:58:47
|
My vote is for consistency in numpy. But it is unclear what consistency is. What is truly confusing for newbie Python users (and a source for error even after 5 years of Python programming) is that >>> 2/3 0 In that respect, I would think >>> numpy.sqrt(2) should give 1, but it gives 1.4142135623730951 So numpy does typechecking anyway (it gets an integer and makes it a float). If that is the consistent behavior, then by all means >>> sqrt(-1) should return 1j. Wouldn't that be the consistent thing to do???? Mark |