Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ categories = ["algorithms"]
license = "MIT"

[dependencies]
num-complex = { version = "0.4.0", features = ["serde", "rand"] }
num-complex = { git = "https://github.com/Dirreke/num-complex.git", branch="bump-rand", features = ["serde", "rand"] }
num-traits = "0.2.14"
rand = "0.8.3"
rand = "0.9.0"
serde = "1.0.124"

[package.metadata.release]
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

use num_complex::Complex;
use num_traits::{Float, FromPrimitive, NumAssign, NumCast, NumOps, ToPrimitive, Zero};
use rand::{distributions::Standard, prelude::*};
use rand::{distr::StandardUniform, Rng};
use serde::{Deserialize, Serialize};
use std::fmt::{Debug, Display, LowerExp, UpperExp};
use std::iter::{Product, Sum};
Expand Down Expand Up @@ -125,7 +125,7 @@ pub trait Scalar:
fn atanh(self) -> Self;

/// Generate an random number from
/// [rand::distributions::Standard](https://docs.rs/rand/0.7.2/rand/distributions/struct.Standard.html)
/// [rand::distr::StandardUniform](https://docs.rs/rand/0.9.0/rand/distr/struct.StandardUniform.html)
fn rand(rng: &mut impl Rng) -> Self;
}

Expand Down Expand Up @@ -223,7 +223,7 @@ macro_rules! impl_scalar {
}

fn rand(rng: &mut impl Rng) -> Self {
rng.sample(Standard)
rng.sample(StandardUniform)
}

impl_with_real!(add_real, +);
Expand Down Expand Up @@ -313,7 +313,7 @@ macro_rules! impl_scalar {
}

fn rand(rng: &mut impl Rng) -> Self {
rng.sample(Standard)
rng.sample(StandardUniform)
}

impl_with_real!(add_real, +);
Expand Down