Skip to content

Commit

Permalink
Fix Unitful rearrange_to_3Darray
Browse files Browse the repository at this point in the history
  • Loading branch information
briochemc committed Feb 15, 2020
1 parent 6628997 commit 2375785
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OceanGrids"
uuid = "cfe838f4-859f-11e9-2ea1-df7d4e7c3537"
authors = ["Benoit Pasquier <pasquieb@uci.edu>"]
version = "0.1.9"
version = "0.1.10"

[deps]
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Expand Down
4 changes: 2 additions & 2 deletions src/OceanGrids.jl
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ export latvec, lonvec, depthvec, latlondepthvecs
Returns a 3D array of `x` rearranged to the `true` entries of `wet3D`.
Entries where `wet3D` is `false` are filled with `NaN`s.
"""
function rearrange_into_3Darray(x, wet3D::BitArray)
function rearrange_into_3Darray(x::Vector{T}, wet3D::BitArray) where T
iwet = findall(wet3D)
x3d = fill(NaN, size(wet3D))
x3d = fill(NaN * unit(T), size(wet3D))
x3d[iwet] .= x
return x3d
end
Expand Down

2 comments on commit 2375785

@briochemc
Copy link
Owner Author

Choose a reason for hiding this comment

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

@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/9499

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 Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.10 -m "<description of version>" 2375785236a0d959d7d8ed7368e2ed109c2385b5
git push origin v0.1.10

Please sign in to comment.