Code Monkey home page Code Monkey logo

nplocate's People

Contributors

yangyushi avatar

Stargazers

 avatar  avatar

Watchers

 avatar

nplocate's Issues

Numba version mismatch issue

The package is not compatible with old numba versions. I should dug out the minimum numba version number and explicitly specify it in the setup file.

Typically, the users get the error message like the following

TypeError: expected dtype object, got 'numpy.dtype[float64]'

when calling the get_gr_pyhs function.

Interactive see_slice

I should spend some time to make see_slice interactive. It would be better if people can manually add some particles with a GUI.

napery might be a good tool. Don't know how hard it is to install it.

Incompatibility of Python3.8+, Cython, Numpy, and Numba

Some user with Python version newer than 3.8 might experience following issue when importing nplocate.

>>> import nplocate
Traceback (most recent call last):
 File<stdin>“, line 1, in <module>
 File “.../python3.8/site-packages/nplocate/__init__.py”, line 4, in <module>
  from .model import GaussianSphere
 File “.../python3.8/site-packages/nplocate/model.py”, line 16, in <module>
  from nplocate import csimulate
 Filenplocate/csimulate.pyx”, line 1, in init nplocate.csimulate
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

After some experiment I think this is related to the version of numpy (1.20.x). It needs to be upgraded to 1.22.x, so that the Cython compiled code csimulate.pyx could work.

So, if you see the error, try to upgrade the numpy to latest version.

However, the situation can be harder when numba is taken into consideration. The current numba version (0.54.1) does not support numpy 1.21.x +. Hopefully the numba people will support latest numpy at some point. At the moment, the way to solve the issue seems to be using an older Python (like Python 3.7).

Inconsistence numerical values between python3 and python2

On my own computer the code gave slightly different numerical values, with an order of 10^-4, between different version of python.

  • python3.7.7 + scipy 1.5.2 + numpy 1.20.2
  • python2.7.16 + scipy 0.16.0 + numpy 1.16.6

This should not be a big problem, but still worrying. The safe option is to always stick to the latest versions of relevant packages.

not python2 compatible

Supporting python2 is important because it enables people to work with colloids.

To do so I will have to support utf-8 encoding and find a work around for f string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.