Merge pull request #11 from Polochon-street/make-to-vec-public

Make `to_vec` public.
This commit is contained in:
Polochon-street 2021-06-06 17:11:24 +02:00 committed by GitHub
commit e6ea145744
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,8 @@
# Changelog
## bliss 0.2.4
* Make `Analysis::to_vec()` public.
## bliss 0.2.3
* Made `NUMBER_FEATURES` public.

2
Cargo.lock generated
View File

@ -75,7 +75,7 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
[[package]]
name = "bliss-audio"
version = "0.2.3"
version = "0.2.4"
dependencies = [
"bliss-audio-aubio-rs",
"crossbeam",

View File

@ -1,6 +1,6 @@
[package]
name = "bliss-audio"
version = "0.2.3"
version = "0.2.4"
authors = ["Polochon-street <polochonstreet@gmx.fr>"]
edition = "2018"
license = "GPL-3.0-only"

View File

@ -156,15 +156,18 @@ impl Analysis {
}
}
/// Return an ndarray `arr1`.
/// Return an ndarray `Array1` representing the analysis' features.
///
/// Particularly useful if you want to make a custom distance metric.
pub fn to_arr1(&self) -> Array1<f32> {
arr1(&self.internal_analysis)
}
#[allow(dead_code)]
pub(crate) fn to_vec(&self) -> Vec<f32> {
/// Return a Vec<f32> representing the analysis' features.
///
/// Particularly useful if you want iterate through the values to store
/// them somewhere.
pub fn to_vec(&self) -> Vec<f32> {
self.internal_analysis.to_vec()
}