Skip to content

Commit

Permalink
Merge pull request #207 from neutrinoceros/no_depr_api
Browse files Browse the repository at this point in the history
MNT: avoid usage of deprecated unyt API
  • Loading branch information
brittonsmith authored Jul 20, 2023
2 parents 344eff8 + 5a5cf56 commit 60bcffc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dependencies = [
"yt>=4.0.1",
# https://github.com/scipy/oldest-supported-numpy/issues/76#issuecomment-1628865694
"numpy>=1.17.5,<2.0",
"packaging>=20.9",
]

[project.readme]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,24 @@
# The full license is in the file COPYING.txt, distributed with this software.
# -----------------------------------------------------------------------------

from importlib.metadata import version

import numpy as np
from packaging.version import Version

from yt.funcs import mylog
from yt.units.yt_array import uconcatenate
from yt.utilities.parallel_tools.parallel_analysis_interface import (
parallel_blocking_call,
)
from yt.visualization.fixed_resolution import FixedResolutionBuffer

_UNYT_VERSION = Version(version("unyt"))

if _UNYT_VERSION >= Version("3.0"):
uconcatenate = np.concatenate
else:
from unyt.array import uconcatenate


@parallel_blocking_call
def _light_cone_projection(
Expand Down

0 comments on commit 60bcffc

Please sign in to comment.