Skip to content

Commit

Permalink
Publish v5.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Dec 9, 2018
1 parent f429bd8 commit 088f845
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 65 deletions.
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# History

# not yet released, version 5.4.0
# 2018-12-09, version 5.4.0

- Extended sum.js to accept a dimension input to calculate the sum over a
specific axis. Thanks @bnlcas.
Expand Down
6 changes: 1 addition & 5 deletions docs/reference/functions/sum.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@

Compute the sum of a matrix or a list with values.
In case of a (multi dimensional) array or matrix, the sum of all
elements will be calculated. When `dim` is provided, the sum over the selected
dimension will be calculated. Parameter `dim` is zero-based.
elements will be calculated.


## Syntax

```js
math.sum(a, b, c, ...)
math.sum(A)
math.sum(A, dim)
```

### Parameters
Expand All @@ -35,8 +33,6 @@ Type | Description
math.sum(2, 1, 4, 3) // returns 10
math.sum([2, 1, 4, 3]) // returns 10
math.sum([[2, 5], [4, 3], [1, 7]]) // returns 22
math.sum([[2, 5], [4, 3], [1, 7]], 0) // returns [7, 15]
math.sum([[2, 5], [4, 3], [1, 7]], 1) // returns [7, 7, 8]
```


Expand Down
Loading

0 comments on commit 088f845

Please sign in to comment.