2
np.floor_divide(1.0,0)

results inf with RuntimeWarning: divide by zero encountered in floor_divide np.floor_divide(1.0,0) on Linux but results nan on Mac with no warning/error.

Why this difference on Mac and Linux ?

Noushadali
  • 41
  • 5
  • can you provide the exact numpy version for both your attempts? – mozway May 18 '22 at 12:14
  • I guess you use a Mac with M1 processor isn't it? Can you try to build and check the development version of Numpy? – Jérôme Richard May 18 '22 at 13:16
  • On mac numpy version is '1.19.5' and on Linux it is '1.21.4' – Noushadali May 18 '22 at 13:25
  • By "check the development version of Numpy" I mean building the package from https://github.com/numpy/numpy and check if you still have the error. I remember similar issues have been reported on Mac (with the new M1 processor). It is certainly a bug and it may have been solved recently. – Jérôme Richard May 18 '22 at 17:00

0 Answers0