Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
irp
Fresnel
Commits
0925342a
Commit
0925342a
authored
May 10, 2021
by
Leon Merten Lohse
Browse files
fix meshgrid indexing
parent
f76aebc8
Pipeline
#195076
failed with stages
in 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fresnel/misc.py
View file @
0925342a
...
...
@@ -28,7 +28,7 @@ def fftfreqn(n, dx=1):
xi
=
[
fftfreq
(
n_i
,
dx_i
)
for
n_i
,
dx_i
in
zip
(
n
,
dx
)]
return
np
.
meshgrid
(
*
xi
,
sparse
=
True
)
return
np
.
meshgrid
(
*
xi
,
sparse
=
True
,
indexing
=
'ij'
)
def
gridn
(
n
):
...
...
@@ -37,7 +37,7 @@ def gridn(n):
x
=
[
np
.
arange
(
-
n
[
dim
]
+
1
,
n
[
dim
])
for
dim
in
range
(
ndim
)]
return
np
.
meshgrid
(
*
x
,
sparse
=
True
)
return
np
.
meshgrid
(
*
x
,
sparse
=
True
,
indexing
=
'ij'
)
def
crop
(
a
,
crop_width
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment