Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'G' from 'pointpats' #101

Open
SFashandi opened this issue Apr 6, 2023 · 7 comments
Open

cannot import name 'G' from 'pointpats' #101

SFashandi opened this issue Apr 6, 2023 · 7 comments
Assignees

Comments

@SFashandi
Copy link

Hi there,

Importing G, F, J, K, L, I get an import error like below:
ImportError: cannot import name 'G' from 'pointpats'

Thanks.

@weikang9009
Copy link
Member

Thank you for reporting the import issue @SFashandi.
@ljwolf It seems that all the functions/classes defined in the old distance_statistics module are imported in the new distance_statistics module, but as they are not included in _all_. Therefore, those functions/classes are not directly accessible to the users. Do we want to modify this? Or are those old functions/classes already depreciated? If the latter is true, we should probably remove the jupyter notebook demonstrating the use of those old functions/classes as it is not working.

@SFashandi
Copy link
Author

Hi,
I used documents related to the latest version of pointpats (2.3.0). (https://pypi.org/project/pointpats/)
I'm not sure which of those two options are correct but I guess something need to be modified in source code.
All the best.

@ljwolf
Copy link
Member

ljwolf commented May 11, 2023

Hey, yes I think we should fully deprecate the previous implementations and proceed with the numpy implementations for the performance reasons we discussed before.

I just have not had the time to keep up with the toolchain changes in order to do this kind of maintenance... I am eager to do this, though, and I think we should make a major point release to incorporate these changes.

For now, the numpy-oriented notebook should be used, and we'll work to swap the documentation?

@weikang9009
Copy link
Member

@ljwolf thanks for the explanation!

@SFashandi please follow the numpy-oriented notebook and the API docs to use distance-based statistics. The older implementation of these statistics is depreciated and cannot be used with the current version of pointpats.

@SFashandi
Copy link
Author

Thanks alot.

@hhatam
Copy link

hhatam commented Jul 31, 2023

@ljwolf thanks for the explanation!

@SFashandi please follow the numpy-oriented notebook and the API docs to use distance-based statistics. The older implementation of these statistics is depreciated and cannot be used with the current version of pointpats.

I tried all the functions in API and I've encountered this error:
name 'TREE_TYPES' is not defined
Non of them work. I think there is something wrong with geometry function new versions that just doesn't match.

@Grozby
Copy link

Grozby commented Sep 4, 2023

@ljwolf thanks for the explanation!
@SFashandi please follow the numpy-oriented notebook and the API docs to use distance-based statistics. The older implementation of these statistics is depreciated and cannot be used with the current version of pointpats.

I tried all the functions in API and I've encountered this error: name 'TREE_TYPES' is not defined Non of them work. I think there is something wrong with geometry function new versions that just doesn't match.

Hello @hhatam, the notebook is not updated: instead of importing

from pointpats import ripley

...

ripley.g_test(...)

Use

from pointpats import distance_statistics

...

distance_statistics.g_test(...)

This works for me with pointpats==2.3.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants