Giter Club home page Giter Club logo

csaps-rs's People

Contributors

espdev avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

csaps-rs's Issues

Update ndarray and sprs deps?

The ndarray, sprs, and sprs-ldl crates have changed a bit since the last release of csaps. I think the performance bug due to sprs might have been fixed by now? How much work is it to update csaps to the newest versions of those?

I'm having some issues using it currently, due to other dependencies using newer versions of ndarray.

Error whilst trying the example the trait `AsRef<[_]>` is not implemented

I cannot run the example, I surely did something wrong, but the &x, &y and &w are underlined basically saying the AsRef trait is not implemented?Cargo.toml:
ndarray = {version = "0.15.6", feature =["rayon"]}
ndarray-linalg = { version = "0.16.0", features = ["intel-mkl-static"] }
csaps = "0.3.0"

// some of the imports are not used
use csaps::CubicSmoothingSpline;
use ndarray::{array, Array1, Array2, Zip, Axis, ArrayView2, ArrayView1, stack, Array, Dim, ArrayViewMut};
    let x = array![1.0, 2.0, 3.0, 4.0];
    let y = array![0.5, 1.2, 3.4, 2.5];
    let w = array![1.0, 0.7, 0.5, 1.0];
    let smooth = 0.85;

    let s = CubicSmoothingSpline::new(&x, &y)
        .with_weights(&w)
        .with_smooth(smooth)
        .make().unwrap();
error[E0277]: the trait bound `ArrayBase<OwnedRepr<{float}>, Dim<[usize; 1]>>: AsRef<[_]>` is not satisfied
   --> src\wmap\apply.rs:61:39
    |
61  |     let s = CubicSmoothingSpline::new(&x, &y)
    |             ------------------------- ^^ the trait `AsRef<[_]>` is not implemented for `ArrayBase<OwnedRepr<{float}>, Dim<[usize; 1]>>`
    |             |
    |             required by a bound introduced by this call
    |
    = note: required for `ndarray::ArrayBase<ndarray::ViewRepr<&_>, ndarray::dimension::dim::Dim<[usize; 1]>>` to implement `From<&ArrayBase<OwnedRepr<{float}>, Dim<[usize; 1]>>>`
    = note: required for `&ArrayBase<OwnedRepr<{float}>, Dim<[usize; 1]>>` to implement `Into<ndarray::ArrayBase<ndarray::ViewRepr<&_>, ndarray::dimension::dim::Dim<[usize; 1]>>>`
    = note: required for `&ArrayBase<OwnedRepr<{float}>, Dim<[usize; 1]>>` to implement `ndarray::arraytraits::AsArray<'_, _>`
note: required by a bound in `CubicSmoothingSpline::<'a, T, D>::new`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.