slaclab / lume-genesis

Genesis 1.3 tools for use in LUME
https://slaclab.github.io/lume-genesis/
Apache License 2.0
4 stars 7 forks source link

np.float error #20

Open petr-lanl opened 5 months ago

petr-lanl commented 5 months ago

Hello,

I have installed lume-genesis from conda-forge today and I am getting the following error: " module 'numpy' has no attribute 'float'. np.float was a deprecated alias for the builtin float. To avoid this error in existing code, use float by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64 here. The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'? " I have python 3.12.2 and numpy 1.26.4

Could not find np.float in lume-genesis files. Can you help?

My temporary solution is: np.float = float

ChristopherMayes commented 5 months ago

@petr-lanl Could you paste the error pointing to the line of code that it complains about?

petr-lanl commented 5 months ago

@ChristopherMayes I am running a basic example from genesis2 directory. I think that G.run captures the exception so I do not see the line of code that it complaints about:

image

I don't know if it matters but I have openmpi version of genesis2 installed from conda-forge

ChristopherMayes commented 5 months ago

@petr-lanl I can't reproduce this. I suspect your lume-base and/or genesis packages are old. Could you show your versions like:

 python -c "import genesis;print(genesis.__version__)"
0.6.3

python -c "import lume;print(lume.__version__)"
0.3.2
petr-lanl commented 5 months ago

I have tried in the terminal and in the notebook. Same outcome: (lume-gen) [@x~]$ python -c "import genesis;print(genesis.version)" 0.6.3 (lume-gen) [x@x~]$ python -c "import lume;print(lume.version)" 0.3.2

Here are all the packages in my environment: channels:

ChristopherMayes commented 5 months ago

@petr-lanl could you provide a complete example?

petr-lanl commented 5 months ago

I am getting this error when I am trying to run a basic example shipped with lume-genesis: @.*** Executing G.run() aborts with the error message.

Petr

From: Christopher Mayes @.> Reply-To: slaclab/lume-genesis @.> Date: Sunday, February 25, 2024 at 12:53 PM To: slaclab/lume-genesis @.> Cc: "Anisimov, Petr Mikhaylovich" @.>, Mention @.***> Subject: [EXTERNAL] Re: [slaclab/lume-genesis] np.float error (Issue #20)

@petr-lanlhttps://urldefense.com/v3/__https:/github.com/petr-lanl__;!!Bt8fGhp8LhKGRg!CpGLJlRRUzM2V7wgBTtLzeJzRXKPWr_N8xdF8UHqjJjrpznVWiBKlk340m6F-xMKzr9nV2MlWIPpKk-pdOEtLA$ could you provide a complete example?

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/slaclab/lume-genesis/issues/20*issuecomment-1963043232__;Iw!!Bt8fGhp8LhKGRg!CpGLJlRRUzM2V7wgBTtLzeJzRXKPWr_N8xdF8UHqjJjrpznVWiBKlk340m6F-xMKzr9nV2MlWIPpKk-xBvbdJg$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/AQBNSIKKJSL2GKXLAS2MWNLYVOJELAVCNFSM6AAAAABDXTL4G2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRTGA2DGMRTGI__;!!Bt8fGhp8LhKGRg!CpGLJlRRUzM2V7wgBTtLzeJzRXKPWr_N8xdF8UHqjJjrpznVWiBKlk340m6F-xMKzr9nV2MlWIPpKk9oP0EMBA$. You are receiving this because you were mentioned.Message ID: @.***>