Skip to content

Commit

Permalink
Merge branch 'main' into paddy/issue-124
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy committed Nov 15, 2024
2 parents c7745ef + a7c795a commit 83f6c12
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions glass/ext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"""

import os.path
from pkgutil import extend_path


def _extend_path(path: list[str], name: str) -> list[str]:
"""
Expand All @@ -23,9 +26,6 @@ def _extend_path(path: list[str], name: str) -> list[str]:
The extended path.
"""
import os.path
from pkgutil import extend_path

_pkg, _, _mod = name.partition(".")

return list(
Expand Down
3 changes: 1 addition & 2 deletions glass/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import collections.abc
import typing
import warnings
from itertools import combinations_with_replacement, product

import healpy as hp
import numpy as np
Expand Down Expand Up @@ -553,8 +554,6 @@ def effective_cls(
If the shapes of *weights1* and *weights2* are incompatible.
"""
from itertools import combinations_with_replacement, product

# this is the number of fields
n = int((2 * len(cls)) ** 0.5)
if n * (n + 1) // 2 != len(cls):
Expand Down
3 changes: 1 addition & 2 deletions glass/shells.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

from cosmology.api import CosmologyConstantsNamespace, StandardCosmology

from glass.core.algorithm import nnls
from glass.core.array import ndinterp

ArrayLike1D = typing.Union[collections.abc.Sequence[float], npt.NDArray[np.float64]]
Expand Down Expand Up @@ -652,8 +653,6 @@ def partition_nnls(
The partition.
"""
from glass.core.algorithm import nnls

# make sure nothing breaks
sumtol = max(sumtol, 1e-4)

Expand Down
3 changes: 0 additions & 3 deletions tests/test_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

import pytest_mock

if typing.TYPE_CHECKING:
import collections.abc


def catpos(
pos: collections.abc.Generator[
Expand Down

0 comments on commit 83f6c12

Please sign in to comment.