py4dstem / py4dstem/py4DSTEM

Add Numpy 2 compatibility

Open
#710 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
279
Forks
177
PR merge metrics
No merged PRs in 30d

Description

We would like to use py4DSTEM in Python environments with numpy 2.x.

The core packages seem to all be available to be used with numpy 2.x. Tested with this command:

conda create -n trial_dependencies -c conda-forge numpy scipy hdf5 hdf5plugin ncempy matplotlib scikit-image scikit-learn scikit-optimize tqdm dill gdown dask distributed emdfile mpire threadpoolctl pylops colorspacious

Some of the extensions dependencies may not yet available on conda-forge, but are available on PyPI (tensorflow requires 2.18 for numpy 2 compatibility, 2.18 isn't available using conda-forge on macOS arm64 yet). I'm on a macOS machine right now so I couldn't try everything (i.e. cupy).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by recreating the reported conda environment with NumPy 2.x and the listed core dependencies. Check whether py4DSTEM imports and its core and optional extensions work, including the TensorFlow and CuPy cases where available; done means supported environments run successfully under NumPy 2.x.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, tensorflow
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.