The attached patch was made against the current "develop" branch. The trac
issue tracker at matforge would not allow me to register in order to create
a ticket for this ("The page you are looking for is temporarily
unavailable"), otherwise I would have put a pull request there on a new
ticket.For some reason that I didn't have the time to dig into sufficiently, it turns out that 64-bit python on 64-bit windows still regards "int" as 32-bit, and not, as the other OSs do, 64-bit. This causes numerous problems with error messages about dtype=int64 not matching with dtype=int32. For example (the one that failed tests for me) the numpy function argmin() returns an array of dtype=int64, but if this result is assigned to an array slice that was created with dtype=int, then errors occur on win64 & py64, but not on other x64 OSs. The attached patch defines a numerix.INT_DTYPE value that is set based on the detected platform. I then changed a handful of dtype=int references in a few other files, to refer to the new definition in numerix. After making this change, the fipy tests pass (using the scipy solver; pysparse on py+Windows x64 appears to be afflicted by the same issue and I haven't had a chance to look at it yet) although there are some issues with double_scalars() that appear to be unrelated to the int issue: F:\CalebHattingh\repos\fipy\examples>C:\WinPython-64bit-2.7.5.0\python-2.7.5.amd 64\python.exe test.py ................................................................................ ...f:\calebhattingh\repos\fipy\fipy\variables\variable.py:1165: RuntimeWarning: divide by zero encountered in double_scalars return self._BinaryOperatorVariable(lambda a,b: a/b, other) ................................................................................ .......................f:\calebhattingh\repos\fipy\fipy\solvers\scipy\linearLUSo lver.py:71: RuntimeWarning: invalid value encountered in double_scalars if (numerix.sqrt(numerix.sum(errorVector**2)) / error0) <= self.tolerance: .....F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor1D.py:3: Ru ntimeWarning: divide by zero encountered in log ## F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor1D.py:18: Runtim eWarning: divide by zero encountered in double_scalars # of their official duties. Pursuant to title 17 Section 105 of the .F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor2D.py:3: Runtim eWarning: divide by zero encountered in log ## F:\CalebHattingh\repos\fipy\examples\reactiveWetting\liquidVapor2D.py:22: Runtim eWarning: divide by zero encountered in double_scalars # other parties, and makes no guarantees, expressed or implied, about ... ---------------------------------------------------------------------- Ran 195 tests in 264.878s OK kind regards Caleb
win64_numpy_int.patch
Description: Binary data
_______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
