Skip to content

Commit

Permalink
Fix broadcasting with 1.6.5. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
roflmaostc committed Jul 28, 2022
1 parent 4feb95c commit 6efb2c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "FourierTools"
uuid = "b18b359b-aebc-45ac-a139-9c0ccbb2871e"
authors = ["Felix Wechsler (roflmaostc) <[email protected]>", "rheintzmann <[email protected]>"]
version = "0.3.2"
version = "0.3.3"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 3 additions & 1 deletion src/nfft_nd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ function plan_nfft_nd(src::AbstractArray{T,D}, dst_coords::AbstractArray{T2,D2},
# the eps is necessary due to round-off errors, which makes the comparisone with ift otherwise fail
maxfreq = RT.(floor.((dsz.-1)./2) ./ dsz) .+ eps(RT)

pad_mask = any((x .< -RT(0.5)) .|| (x .> maxfreq), dims=1)[:]
# before it used .|| but broadcasting on || is unsupported in 1.6
#pad_mask = any((x .< -RT(0.5)) .||(x .> maxfreq), dims=1)[:]
pad_mask = any(map((a,b) -> a || b, (x .< -RT(0.5)), (x .> maxfreq)), dims=1)[:]

pad_value = let
if isnothing(pad_value)
Expand Down

2 comments on commit 6efb2c1

@roflmaostc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

  • Fix bug in NFFT planning for Julia 1.6

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/65166

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.3 -m "<description of version>" 6efb2c11a7bd2981c0892ed2034af19a0d791f2d
git push origin v0.3.3

Please sign in to comment.