Skip to content

Numpy to rust-ndarray docs error. #431

@dineshadepu

Description

@dineshadepu

Hi,

I am trying the example code given in docs. I tried zeros example.

    let foo = Array::zeros((3, 2, 4).f());

Which gave me an error

error[E0283]: type annotations required: cannot resolve `_: std::clone::Clone`
 --> src/main.rs:8:15
  |
8 |     let foo = Array::zeros((3, 2, 4).f());
  |               ^^^^^^^^^^^^
  |
  = note: required by `ndarray::impl_constructors::<impl ndarray::ArrayBase<S, D>>::zeros`

Am I doing it right ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions