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

Behaviour of precompute transforms with kernel = None default unclear #247

Open
matt-graham opened this issue Nov 26, 2024 · 0 comments
Open
Labels
documentation Improvements or additions to documentation

Comments

@matt-graham
Copy link
Collaborator

Both the forward and inverse precompute transforms default to a value of None for their kernel argument and the corresponding docstrings indicate this argument is optional:

def inverse(
flm: np.ndarray,
L: int,
spin: int = 0,
kernel: np.ndarray = None,
sampling: str = "mw",
reality: bool = False,
method: str = "jax",
nside: int = None,
) -> np.ndarray:

def forward(
f: np.ndarray,
L: int,
spin: int = 0,
kernel: np.ndarray = None,
sampling: str = "mw",
reality: bool = False,
method: str = "jax",
nside: int = None,
) -> np.ndarray:

Looking through the underlying implementations though, I cannot spot any logic for handling a kernel is None case with the kernel value passed as is in to a call to einsum.

I think we probably either want to remove the None defaults (and optional labels in the docstrings) or add some logic for automatically computing an appropriate value for kernel if left as the default None?

@matt-graham matt-graham added the documentation Improvements or additions to documentation label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant