Charles R Harris wrote: > Travis, > > Is this intentional? > > In [77]: arange(5, dtype=int)/0 > Out[77]: array([0, 0, 0, 0, 0]) > > It looks deliberate because all zeros are returned, but it might be > better if it raised an exception.
It is deliberate. Numarray introduced it (the only difference being that by default NumPy has division-by-zero erros turned off). It's tied to the way floating-point division-by zero is handled. There is a valid argument for having a separate integer-division flag so that you can raise exceptions for integer-division but not for floating-point division. I'm open to that change for 1.0rc1 -Travis ------------------------------------------------------------------------- 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