Skip to content

Instantly share code, notes, and snippets.

View bjarthur's full-sized avatar

Ben Arthur bjarthur

  • Howard Hughes Medical Institute / Janelia Research Campus / Scientific Computing
  • Ashburn, Virginia, United States
View GitHub Profile
@bjarthur
bjarthur / extrema.jl
Last active June 6, 2017 13:20
extrema implementations
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))
end
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}:
1
2
3
This file has been truncated, but you can view the full file.
/*============================================================================*/
/* National Instruments / Data Acquisition */
/*----------------------------------------------------------------------------*/
/* Copyright (c) National Instruments 2003-2019. All Rights Reserved. */
/*----------------------------------------------------------------------------*/
/* */
/* Title: NIDAQmx.h */
/* Purpose: Include file for NI-DAQmx library support. */
/* */
This file has been truncated, but you can view the full file.
/*============================================================================*/
/* National Instruments / Data Acquisition */
/*----------------------------------------------------------------------------*/
/* Copyright (c) National Instruments 2003-2019. All Rights Reserved. */
/*----------------------------------------------------------------------------*/
/* */
/* Title: NIDAQmx.h */
/* Purpose: Include file for NI-DAQmx library support. */
/* */
This file has been truncated, but you can view the full file.
/*============================================================================*/
/* National Instruments / Data Acquisition */
/*----------------------------------------------------------------------------*/
/* Copyright (c) National Instruments 2003-2019. All Rights Reserved. */
/*----------------------------------------------------------------------------*/
/* */
/* Title: NIDAQmx.h */
/* Purpose: Include file for NI-DAQmx library support. */
/* */