Skip to content

Commit 274e7eb

Browse files
pre-commit-ci[bot]RemiLehe
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 058e032 commit 274e7eb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lasy/utils/grid.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
2-
from lasy.backend import xp, use_cupy
2+
3+
from lasy.backend import use_cupy, xp
34

45
time_axis_indx = -1
56

@@ -79,8 +80,8 @@ def set_temporal_field(self, field):
7980
assert field.shape == self.temporal_field.shape
8081
assert field.dtype == "complex128"
8182
if use_cupy and type(field) == np.ndarray:
82-
field = xp.asarray(field) # Copy to GPU
83-
self.temporal_field[:,:,:] = field
83+
field = xp.asarray(field) # Copy to GPU
84+
self.temporal_field[:, :, :] = field
8485
self.temporal_field_valid = True
8586
self.spectral_field_valid = False # Invalidates the spectral field
8687

@@ -96,8 +97,8 @@ def set_spectral_field(self, field):
9697
assert field.shape == self.spectral_field.shape
9798
assert field.dtype == "complex128"
9899
if use_cupy and type(field) == np.ndarray:
99-
field = xp.asarray(field) # Copy to GPU
100-
self.spectral_field[:,:,:] = field
100+
field = xp.asarray(field) # Copy to GPU
101+
self.spectral_field[:, :, :] = field
101102
self.spectral_field_valid = True
102103
self.temporal_field_valid = False # Invalidates the temporal field
103104

0 commit comments

Comments
 (0)