astropy / astropy/halotools

Issue with Importing positional_marked_npairs_3d from halotools.mock_observables.pair_counters

Open
#1,074 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
120
Forks
70
PR merge metrics
No merged PRs in 30d

Description

I've encountered an issue when trying to run my code which utilizes the halotools library. Specifically, I'm having trouble importing the positional_marked_npairs_3d function from the halotools.mock_observables.pair_counters module.

Here's the error traceback I received:

Traceback (most recent call last):
File "C:\Users\82103\Desktop\graphgan\GraphGAN\2d_alignment.py", line 12, in
from halotools_ia.correlation_functions import ed_3d, ee_3d, ed_3d_one_two_halo_decomp
File "C:\Users\82103\Desktop\graphgan\GraphGAN\halotools_ia\correlation_functions\__init__.py", line 11, in
from .ed_3d import ed_3d
File "C:\Users\82103\Desktop\graphgan\GraphGAN\halotools_ia\correlation_functions\ed_3d.py", line 15, in
from halotools.mock_observables.pair_counters import positional_marked_npairs_3d, npairs_3d, marked_npairs_3d
ImportError: cannot import name 'positional_marked_npairs_3d' from 'halotools.mock_observables.pair_counters' (C:\Users\82103\.conda\envs\galaxygan\lib\site-packages\halotools\mock_observables\pair_counters\__init__.py)

I've tried using both version 0.8.0 and 0.8.2 of halotools, but encountered the same error in both versions. I've verified my halotools installation and even tried different versions, but the issue persists. I'm wondering if this function has been moved to a different module or if there might be some other underlying issue I'm not aware of.

Any guidance or assistance on this matter would be greatly appreciated.

Thank you for your time and consideration.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the import in halotools_ia/correlation_functions/ed_3d.py and inspect the exported names from halotools.mock_observables.pair_counters in the reported 0.8.0 and 0.8.2 installations. Confirm whether positional_marked_npairs_3d is available under either version, then document the supported import path or the missing-function behavior so the reported import can be resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.