Skip to content

Commit

Permalink
Merge branch 'main' into saransh/test_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Nov 14, 2024
2 parents e8942e0 + a7c795a commit 8dc4263
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 @@ -52,6 +52,7 @@
import numpy as np
import numpy.typing as npt

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

if typing.TYPE_CHECKING:
Expand Down Expand Up @@ -644,8 +645,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 8dc4263

Please sign in to comment.