Skip to content

Commit

Permalink
Replace calls to .sum() with .sum_axis()
Browse files Browse the repository at this point in the history
  • Loading branch information
tspooner committed Sep 12, 2017
1 parent aa704e9 commit 615891e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fa/projection/rbf_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ impl RBFNetwork {
impl Projection<RegularSpace<Continuous>> for RBFNetwork {
fn project(&self, input: &Vec<f64>) -> Array1<f64> {
let d = &self.mu - &ArrayView::from_shape((1, self.mu.cols()), input).unwrap();
let e = (&d * &d * &self.gamma).mapv(|v| v.exp()).sum(Axis(1));
let z = e.sum(Axis(0));
let e = (&d * &d * &self.gamma).mapv(|v| v.exp()).sum_axis(Axis(1));
let z = e.sum_axis(Axis(0));

e / z
}
Expand Down

0 comments on commit 615891e

Please sign in to comment.