Skip to content

Instantly share code, notes, and snippets.

Gabriel Gellner gabrielgellner

Block or report user

Report or block gabrielgellner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View A nodrop macro for Julia
# So that we ensure that dimensions do not drop (Taken from Matt Bauman, the man the legend)
make_reals_one_vectors(x::Real) = x:x
make_reals_one_vectors(x) = x
@Base.propagate_inbounds fullindex(x, I...) = getindex(x, map(make_reals_one_vectors, I)...)
# This code is just taken from Base, where I replace view -> fullindex
macro nodrop(ex)
if Meta.isexpr(ex, :ref)
ex = Base.replace_ref_end!(ex)
if Meta.isexpr(ex, :ref)
You can’t perform that action at this time.