Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
90f0662d
Commit
90f0662d
authored
May 20, 2020
by
Philipp Arras
Browse files
Get rid of warning
parent
9939375c
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty6/pointwise.py
View file @
90f0662d
...
...
@@ -25,9 +25,13 @@ def _sqrt_helper(v):
def
_sinc_helper
(
v
):
tmp
=
np
.
sinc
(
v
)
tmp2
=
(
np
.
cos
(
np
.
pi
*
v
)
-
tmp
)
/
v
return
(
tmp
,
np
.
where
(
v
==
0.
,
0
,
tmp2
))
fv
=
np
.
sinc
(
v
)
df
=
np
.
empty
(
v
.
shape
,
dtype
=
v
.
dtype
)
sel
=
v
!=
0.
v
=
v
[
sel
]
df
[
sel
]
=
(
np
.
cos
(
np
.
pi
*
v
)
-
fv
[
sel
])
/
v
df
[
~
sel
]
=
0
return
(
fv
,
df
)
def
_expm1_helper
(
v
):
...
...
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