Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtering (filt) across columns of arrays and method signature tweaks #7560

Merged
merged 3 commits into from
Jul 11, 2014

Commits on Jul 10, 2014

  1. Enable filtering (filt) across columns of arrays

    When passed a multidimensional array, simply iterate over its columns, independently filtering each one.  The starting filter state may be given as a vector (in which case it is common across all columns) or an array with the same number of columns as the input.
    mbauman committed Jul 10, 2014
    Configuration menu
    Copy the full SHA
    20430b3 View commit details
    Browse the repository at this point in the history
  2. Relax filt signatures to allow heterogeneous types

    Previously, filt[!] methods were only defined for arguments of all the same type T<:Number. This relaxes that restriction, allowing one to, for example, filter an array of Float32s by Float64 coefficients.
    
    By default, the output of filt will be the determined by promote_type of all arguments.
    
    Instead of defining many type parameters (T<:Number, S<:Number, ...), filt now simply trusts that the eltype of the arrays have methods for basic arithmetic.
    mbauman committed Jul 10, 2014
    Configuration menu
    Copy the full SHA
    128c4a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2014

  1. API change to fix the type instability

    Because we're back to only one optional element for both `filt` and `filt!` (the initial state), I figure it's simpler to just use a positional argument in both cases.  So now the API is:
    
        filt(b, a, x, [si])
        filt!(out, b, a, x, [si])
    mbauman committed Jul 11, 2014
    Configuration menu
    Copy the full SHA
    06803c9 View commit details
    Browse the repository at this point in the history