Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerHeintzmann committed Jul 23, 2024
1 parent 7c78537 commit df30ee5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/viewer_core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -785,9 +785,6 @@ end
converts an array to a jtype array
"""
function to_jtype(anArray)
if isa(anArray, Base.Broadcast.Broadcasted)
anArray = collect(anArray)
end
if eltype(anArray) <: CartesianIndex
anArray = Tuple.(anArray)
end
Expand Down Expand Up @@ -1425,6 +1422,10 @@ function view5d(data, viewer=nothing; gamma=nothing, mode::DisplayMode =DisplNew
throw(e)
end
end
if isa(data, Base.Broadcast.Broadcasted)
data = collect(data)
end

if !isa(data, AbstractArray)
return nothing # just ignore this display. The macro will interpret this as "not displayable"
elseif ndims(data)> 5
Expand Down

2 comments on commit df30ee5

@RainerHeintzmann
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 register

Release notes:
Support for the Broadcasted datatype was added as well as support for visualizing arrays of NTuples or CartesianIndex.

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

Tagging

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.5.2 -m "<description of version>" df30ee566d54e2fc6885df9c401b58d6b81c3051
git push origin v0.5.2

Please sign in to comment.