Skip to content

Instantly share code, notes, and snippets.

@mbauman
mbauman / filtfilt_gustafsson.jl
Created July 7, 2014 14:10
Forward-backward IIR filter that uses Gustafsson's method.
# Forward-backward IIR filter that uses Gustafsson's method.
#
# Apply the IIR filter defined by `(b,a)` to `x` twice, first forward
# then backward, using Gustafsson's initial conditions [1]_.
#
# Let `y_fb` be the result of filtering first forward and then backward,
# and let `y_bf` be the result of filtering first backward then forward.
# Gustafsson's method is to compute initial conditions for the forward
# pass and the backward pass such that `y_fb == y_bf`.
#
diff --git a/base/array.jl b/base/array.jl
index 7c3b978..501693f 100644
--- a/base/array.jl
+++ b/base/array.jl
@@ -289,8 +289,17 @@ done(a::Array,i) = (i > length(a))
## Indexing: getindex ##
-getindex(A::Array, i::Int, I::Int...) = arrayref(A, i, I...)
-unsafe_getindex(A::Array, i::Int, I::Int...) = @inbounds return arrayref(A, i, I...)
diff --git a/base/array.jl b/base/array.jl
index 7c3b978..b28837d 100644
--- a/base/array.jl
+++ b/base/array.jl
@@ -289,8 +289,17 @@ done(a::Array,i) = (i > length(a))
## Indexing: getindex ##
-getindex(A::Array, i::Int, I::Int...) = arrayref(A, i, I...)
-unsafe_getindex(A::Array, i::Int, I::Int...) = @inbounds return arrayref(A, i, I...)
This file has been truncated, but you can view the full file.
JULIA test/all
WARNING: general linear indexing is deprecated; use reshape(A, Val{1}) before indexing
!atcaller!> in *(::UpperTriangular{Float32,Array{Float32,2}}, ::Array{BigFloat,1}) at triangular.jl:1559 in /Users/mbauman/Code/julia-0.6/test/linalg/triangular.jl at 17
Stacktrace:
[1] depwarn(::String, ::Tuple{Symbol,Symbol,Symbol}) at ./deprecated.jl:64
[2] _to_linear_index(::Array{BigFloat,1}, ::Int64, ::Int64, ::Vararg{Int64,N}) at ./abstractarray.jl:850
[3] _getindex at ./abstractarray.jl:837 [inlined]
[4] getindex at ./multidimensional.jl:184 [inlined]
[5] A_mul_B!(::UpperTriangular{BigFloat,Array{BigFloat,2}}, ::Array{BigFloat,1}) at ./linalg/triangular.jl:582
[6] *(::UpperTriangular{Float32,Array{Float32,2}}, ::Array{BigFloat,1}) at ./linalg/triangular.jl:1559
{
"name": "mycsv",
"title": "Mycsv",
"resources": [
{
"name": "etp_participant_data",
"title": "Etp Participant Data",
"schema": {
"fields": [
{
$ ack -C 5 '\bslicedim\b'
AutoGrad/src/base/abstractarraymath.jl
13-# imag
14-# +
15-# *
16-# /
17-# \
18:# slicedim
19-# flipdim
20-# circshift

Status quo

Currently the AbstractArray type hierarchy has three major subtype trees:

  • DenseArray
  • AbstractSparseArray
  • AbstractRange

In addition, we have the StridedArray typealias, which effectively “adds” strided SubArrays and ReshapedArrays as pseudo-subtypes of DenseArrays.

We also have the IndexStyle trait.

julia> VERSION
v"0.7.0-DEV.2114"
julia> methodswith(Function)
[1] guardsrand(f::Function) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1429
[2] guardsrand(f::Function, r::AbstractRNG) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1429
[3] guardsrand(f::Function, seed::Integer) in Test at /Users/mbauman/Code/julia-0.6/usr/share/julia/site/v0.7/Test/src/Test.jl:1439
[4] !(f::Function) in Base at operators.jl:975
[5] all(f::Function, A::AbstractArray, region) in Base at reducedim.jl:619
[6] all!(f::Function, r::AbstractArray, A::AbstractArray) in Base at reducedim.jl:615
```
$ ack --type=julia '@(begin|while|if|for|try|return|break|continue|function|macro|quote|let|local|global|const|do|struct|end|else|catch|finally|true|false)\b' ALL_PACKAGES/
ALL_PACKAGES/ACME/src/ACME.jl
575:@struct ModelRunner{Model<:DiscreteModel,ShowProgress} begin
ALL_PACKAGES/ACME/src/circuit.jl
11:@struct Circuit begin
ALL_PACKAGES/ACME/src/solvers.jl
8:@struct ParametricNonLinEq{F_eval<:Function,F_setp<:Function,F_calcjp<:Function,Scratch} begin
julia> function searchdocs(mod, seen=Set())
mod in seen && return
push!(seen, mod)
for name in names(mod)
isdefined(mod, name) || continue
Base.isdeprecated(mod, name) && continue
b = getfield(mod, name)
docs = Base.Docs.doc(b)
if startswith(string(docs), "No documentation found")
println(mod, ".", name)