Michael Abbott
Michael Abbott
`stack` does not require that the inner iterator defines `axes`, but the code to assemble an error message assumed this. Found here: https://discourse.julialang.org/t/reduce-hcat-is-type-unstable/112800/3
The fast method `reduce(vcat, [v, w, x, y, z])` exists to avoid splatting the outer vector to `vcat(v, w, x, y, z)`. But it seems fairly common to assume this...
A while back I tried to write up a docs page pointing out that Flux is AD-agnostic -- anything which produces an appropriately nested structure should work. This is a...
Before, these wrap the wrapper in a ReshapedArray: ```julia julia> dropdims([1,2,3]'; dims=1) 3-element reshape(adjoint(::Vector{Int64}), 3) with eltype Int64: 1 2 3 julia> insertdims(PermutedDimsArray([1 2; 3 4], (2,1)); dims=2) 2×1×2 reshape(PermutedDimsArray(::Matrix{Int64},...
Accidentally passing a float here (due to forgetting that `ceil` doesn't return an integer) gives an error that's more confusing than it has to be: ```julia julia> repeat(1:3, 4.0) ERROR:...
This adds a method like `gradient(f, ::Duplicated)` which like `train!(loss, model::Duplicated, data, opt)` from https://github.com/FluxML/Flux.jl/pull/2446 uses the Duplicated type to signal that you want to use Enzyme not Zygote. It...
We have `!f === (!)∘f` to negate any boolean function. Was there ever discussion of making `-f === (-)∘f` too? Both are small conveniences to avoid defining `x -> op(x)`....
In expressions like this, `hcat` figures out the size of `I` automatically, but the `rrule` assumes it behaves like a number: ``` julia> y = hcat(I, 11:13) 3×4 Matrix{Int64}: 1...
This adds an error for #810, instead of silently returning a wrong answer.
Quick sketch of one way to easily allow different rules for different arrays, by modifying `setup` -- see docstring. ### PR Checklist - [ ] Tests are added - [...