Coder Social home page Coder Social logo

matrixcompare's People

Contributors

0ncorhynchus avatar andlon avatar christopher22 avatar sebcrozet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

matrixcompare's Issues

Coomatrix compare

Hi,

when I trying to compare a coomatrix, with another matrix. And it gives the error DuplicateSparseEntry, but I think duplicate entries are kind of allowed in coomatrix.

matrixcompare uses num_traits::Float without std

This is a bug report.

I tried to use matrixcompare as a dependency with a tiny sample Cargo.toml shown as the below:

[package]
name = "tmp"
version = "0.1.0"
edition = "2018"

[dependencies]
matrixcompare = "0.1.3"

However, cargo check failed with the message like:

$ cargo check
    Checking matrixcompare v0.1.3
error[E0432]: unresolved import `num_traits::Float`
 --> /home/kato/.cargo/registry/src/github.com-1ecc6299db9ec823/matrixcompare-0.1.3/src/comparators.rs:5:18
  |
5 | use num_traits::{Float, Num};
  |                  ^^^^^
  |                  |
  |                  no `Float` in the root
  |                  help: a similar name exists in the module (notice the capitalization): `float`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `matrixcompare`.

To learn more, run the command again with --verbose.

This is caused by that matrixcompare uses num_traits::Float without the std feature of num-traits.
I found out from Cargo.toml of this crate that it is expected behavior to use num-traits without the std feature.

num-traits = { version = "0.2", default-features = false }

On the other hand, num-traits doesn't export Float without std or libm features.

So, matrixcompare tries to use num_traits::Float, which is not exported.

By the way, matrixcompare is successfully built on the CI now. This is due to the bug of cargo.
matrixcompare uses proptest as a dev-dependency. (and it uses num-traits with the default features including std!)
This is the reason that cargo uses num-traits with the std feature when building matrixcompare as a root crate.
At the last, when I tried to build matrixcompare with the nightly version of cargo, building failed:

$ cargo +nightly -Z features=dev_dep check
   Compiling autocfg v1.0.1
    Checking matrixcompare-core v0.1.0 (/home/kato/wrk/develop/matrixcompare/matrixcompare-core)
   Compiling num-traits v0.2.12
    Checking matrixcompare v0.1.3 (/home/kato/wrk/develop/matrixcompare)
error[E0432]: unresolved import `num_traits::Float`
 --> src/comparators.rs:5:18
  |
5 | use num_traits::{Float, Num};
  |                  ^^^^^
  |                  |
  |                  no `Float` in the root
  |                  help: a similar name exists in the module (notice the capitalization): `float`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `matrixcompare`.

To learn more, run the command again with --verbose.

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.