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

Ndarray dependency update #33

Open
2 tasks
pmalex opened this issue Nov 29, 2024 · 0 comments
Open
2 tasks

Ndarray dependency update #33

pmalex opened this issue Nov 29, 2024 · 0 comments

Comments

@pmalex
Copy link

pmalex commented Nov 29, 2024

Description

When using your crate in my example which uses the last ndarray version (0.16.1 at this point) cargo says

     |
163  |         let xs = mfcc(audio.view(), &SpeechConfig::default());
     |                  ---- ^^^^^^^^^^^^ expected `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>`, found a different `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>`
     |                  |
     |                  arguments to this function are incorrect
     |
     = note: `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>` and `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>` have similar names, but are actually distinct types
note: `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>` is defined in crate `ndarray`
    --> /home/alex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.16.1/src/lib.rs:1280:1
     |
1280 | pub struct ArrayBase<S, D>
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `ArrayBase<ViewRepr<&f32>, Dim<[usize; 1]>>` is defined in crate `ndarray`
    --> /home/alex/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.15.6/src/lib.rs:1268:1
     |
1268 | pub struct ArrayBase<S, D>
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^
     = note: perhaps two different versions of crate `ndarray` are being used?
note: function defined here
    --> /home/alex/.cargo/git/checkouts/mfcc-rust-f366017b42cd793d/4cf3877/speechsauce/src/feature.rs:99:8
     |
99   | pub fn mfcc(signal: ArrayView1<f32>, speech_config: &SpeechConfig) -> Array2<f32> {
     |     

It seems that the problem is in using old version of ndarray and Cargo.toml in both subprojects should be updated, otherwise it impossible to use your crate with never ndarray versions.

DoD (Definition of Done)

  • ndarray version in Cargo.toml updated
  • crate successfully compiles
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant