Skip to content

Commit 3449994

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent edac832 commit 3449994

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

src/amrex/MultiFab.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
License: BSD-3-Clause-LBNL
77
"""
88

9+
910
def mf_to_numpy(amr, self, copy=False, order="F"):
1011
"""
1112
Provide a Numpy view into a MultiFab.
@@ -92,7 +93,9 @@ def register_MultiFab_extension(amr):
9293
"""MultiFab helper methods"""
9394

9495
# register member functions for the MultiFab type
95-
amr.MultiFab.to_numpy = lambda self, copy=False, order="F": mf_to_numpy(amr, self, copy, order)
96+
amr.MultiFab.to_numpy = lambda self, copy=False, order="F": mf_to_numpy(
97+
amr, self, copy, order
98+
)
9699
amr.MultiFab.to_numpy.__doc__ = mf_to_numpy.__doc__
97100

98101
amr.MultiFab.to_cupy = mf_to_cupy

src/amrex/space1d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def Print(*args, **kwargs):
4545

4646

4747
from ..Array4 import register_Array4_extension
48-
from ..MultiFab import register_MultiFab_extension
4948
from ..ArrayOfStructs import register_AoS_extension
49+
from ..MultiFab import register_MultiFab_extension
5050
from ..PODVector import register_PODVector_extension
5151
from ..StructOfArrays import register_SoA_extension
5252

src/amrex/space2d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def Print(*args, **kwargs):
4545

4646

4747
from ..Array4 import register_Array4_extension
48-
from ..MultiFab import register_MultiFab_extension
4948
from ..ArrayOfStructs import register_AoS_extension
49+
from ..MultiFab import register_MultiFab_extension
5050
from ..PODVector import register_PODVector_extension
5151
from ..StructOfArrays import register_SoA_extension
5252

src/amrex/space3d/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ def Print(*args, **kwargs):
4545

4646

4747
from ..Array4 import register_Array4_extension
48-
from ..MultiFab import register_MultiFab_extension
4948
from ..ArrayOfStructs import register_AoS_extension
49+
from ..MultiFab import register_MultiFab_extension
5050
from ..PODVector import register_PODVector_extension
5151
from ..StructOfArrays import register_SoA_extension
5252

tests/test_multifab.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,5 +357,6 @@ def test_mfab_dtoh_copy(make_mfab_device):
357357

358358
# cupy bindings (w/o copy)
359359
import cupy as cp
360+
360361
local_boxes_device = mfab_device.to_cupy()
361362
assert max([cp.max(box) for box in local_boxes_device]) == device_max

0 commit comments

Comments
 (0)