Skip to content

Instantly share code, notes, and snippets.

Ben Arthur bjarthur

  • Howard Hughes Medical Institute / Janelia Research Campus / Scientific Computing
  • Ashburn, Virginia, United States
Block or report user

Report or block bjarthur

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 gist:9c818bba8b4a74eb07f40f879e6c2df8
Optim.jl 0.4.5+ throws an error:
julia> model(x,p) = p[1].*exp(-x./p[2])+p[3]
model (generic function with 1 method)
julia> x
40-element Array{Int64,1}:
bjarthur / extrema.jl
Last active Jun 6, 2017
extrema implementations
View extrema.jl
using Base.Cartesian, Base.Test, BenchmarkTools
extrema_mapslices(v,region) = mapslices(extrema, v, region)
function extrema_functor(a::AbstractArray, dim)
dim = tuple(dim...)
mi = minimum(a,dim)
ma = maximum(a,dim)
reshape(collect(zip(mi,ma)), size(mi))
You can’t perform that action at this time.