89 Commits

Author SHA1 Message Date
jos
ab1b83a2f6 Remove generated files from repo, make tests independent from generated files 2019-05-12 15:14:13 +02:00
jos
427c39c33b Created ES5 and ES6 entry points 2019-04-28 20:56:08 +02:00
jos
f4d4180cea Move all entry files under ./src/entry 2019-04-24 10:48:01 +02:00
jos
33cead1327 Improved deprecation errors and warnings. Introduce lazy again for factories. 2019-04-22 09:45:57 +02:00
jos
6081360d6a Merged develop into modular_architecture 2019-04-13 16:51:51 +02:00
bnlcas
0db42306ec Extend std var for variable dimensions request 999 (#1444)
* initial implementation of multidimensional std and var

* consolidated std function into var, cleaned up the interface for var, fixed bias correction

* added documentation of variable axis for std and var

* updated documentation for std and var

* changed the order of normalization and dimension for a three parameter input in the functions

* updated documentation for var and std

* add transform expressions for std and var with variable axis

* added test coverage for std and var with a variable axis

* update to documentation

* change n dim std to use apply function

* fixed tests, removed unnecessary code, updated docs

* fixed typo in docs

* update docs to remove a type

* changed location of apply function

* updated tests to use deepStrictEqual to pass linter

* adding test coverage for var.transform and std.transform
2019-03-20 15:21:55 +01:00
jos
83df09800b Merge branch 'develop' into modular_architecture_merge
# Conflicts:
#	HISTORY.md
#	gulpfile.js
#	package-lock.json
#	package.json
#	src/core/function/typed.js
#	src/expression/transform/index.js
#	src/function/statistics/sum.js
#	src/function/utils/index.js
#	src/type/unit/Unit.js
#	src/version.js
#	test/expression/node/FunctionNode.test.js
#	test/type/unit/function/createUnit.test.js
#	test/utils/bignumber/formatter.test.js
#	test/utils/number.test.js
2019-02-09 21:26:25 +01:00
jos
99da53da0e Flatten everything in a mathjs instance to make it consistent with the ES6 exports. Create deprecation warnings for the old classes and functions 2019-02-07 21:24:51 +01:00
jos
05e6cfec7f Doc generation working again. Renamed variance and evaluate occurrences in the docs. 2019-01-09 11:21:43 +01:00
jos
5dd0a9ba9c Get bundle working (with lazy loading) 2019-01-02 10:03:05 +01:00
bnlcas
e45c8805b3 Add axis for sum request 1244 (#1310)
* enable sum function to take an argument of dimension for a matrix fulfilling issue #1244

* added sum along a dimension to the unit test coverage for sum

* added information about sum along a dimension to the markdown

* fixed typo in error message

* made formatting chagnes for linter

* add sum to transformed functions
2018-12-09 13:09:36 +01:00
jos
4b3561e426 Use math.evaluate everywhere in the unit tests 2018-12-05 12:22:21 +01:00
jos
942218f0e1 Refactory typed into a regular factory function without special registrations. Remove most listeners. 2018-11-24 18:19:18 +01:00
jos
7a48d972ce Refactored all statistics functions. Renamed var to variance 2018-11-09 12:33:13 +01:00
jos
a2ae756fd1 Remove semicolons 2018-10-31 21:18:51 +01:00
jos
247aeabffa Refactor all unit tests to ES6 import/export 2018-10-31 21:17:23 +01:00
greenkeeper[bot]
c5971b371a Update standard to the latest version 🚀 (#1226)
* chore(package): update standard to version 12.0.0

* update to new lint version with --fix

I believe this mainly adds whitespace to `{}`'s.

* Replace assert.equal with assert.strictEqual

This breaks a lot of tests which I will endevour to fix in the next
commits.

* Fix most errors due to assert.strictEquals

Some instances of `strictEquals` are replaced by `deepEquals`.
`toString` has been used to make some string comparisions explicit.
Tests will still fail untill #1236 and #1237 are fixed.

* Fix assertion erros due to -0

With node 10, assert.strictEqual no longer considers `0 === -0`.
I missed these first time round as I was using node 8.

* Put toString correct side of bracket

I was converting the constructor to a string rather
than the result of the computation. Oops.

* Fixed #1236: quantileSeq has inconsistant return

* Update package-lock

* Fixed #1237: norm sometimes returning a complex number instead of number

* Fix cli tests

* More changes for standardjs, and fixes in unit tests
2018-09-08 16:33:58 +02:00
jos
56a52f6dfd Fix unit tests broken on Nodejs 6 and 8 (no proper NaN assertions) 2018-08-21 21:27:11 +02:00
jos
b6ab40cf88 Fixed #1214: median and other functions not neatly handling NaN 2018-08-21 21:16:15 +02:00
jos
0583771e4e Cleanup unused variables and imports 2018-06-13 17:25:51 +02:00
jos
1f0a37a0cb Split initialized 'const' declarations into multiple statements 2018-06-13 15:31:37 +02:00
jos
17f07ec098 Fixed incompatibility with v4 (index.js file) 2018-06-13 14:02:50 +02:00
jos
b3b96749bf Refactored var into const/let, and removed a lot of semicolons 2018-06-13 12:21:14 +02:00
jos
934ea83df7 Fixed linting issues "Expected consistent spacing" 2018-06-12 21:38:11 +02:00
jos
024b2a9e26 Fix most lint errors using npx standard --fix 2018-06-10 20:28:27 +02:00
jos
635cd0b574 Revert using /lib/ in tests, use /src/ again. Fixed coverage testing. WIP 2018-06-06 22:11:52 +02:00
jos
79071b5e4f Fixed npm run test:browser not working (WIP) 2018-06-06 21:30:41 +02:00
jos
0c084b8e20 npm test working now 2018-06-06 15:36:36 +02:00
jos
f26e5cea03 Improved error messages for statistical functions 2018-01-24 11:52:49 +01:00
jos
326c9fb0de Fixed #680: compare strings by their numerical value instead of alphabetical order 2018-01-23 15:34:49 +01:00
jos
d85f54cf77 Reverted ordering of complex numbers in relational functions. Use natural sort in set functions (See #837) 2017-06-18 21:42:55 +02:00
Gulfaraz Yasin
7446181081 clean up 2017-06-05 17:20:28 +05:30
Gulfaraz Yasin
eda65d2228 used different approach for comparing complex numbers - resolves #837 2017-06-04 22:29:55 +05:30
Gulfaraz Yasin
275b09dce8 support to compare complex numbers #837 2017-05-10 19:05:49 +05:30
Sebastian Ruhleder
fe52d51c0a Add median absolute deviation 2016-12-08 18:29:11 +01:00
jos
a168041374 Functions add and multiply now accept more than two arguments. See #739. 2016-11-18 15:06:37 +01:00
jos
b3c1d63133 Throw an error when functions min, max, mean, or median are invoked with multiple matrices as arguments (see #598) 2016-03-24 21:22:33 +01:00
jos
15aca5e4d0 Changed casing of the values of config options number and matrix to match the actual name of the classes. 2016-03-04 19:41:54 +01:00
jos
f4b794100e Replaced tabs with spaces 2016-03-03 20:29:08 +01:00
Kunal Vyas
ea2f1343c7 Added Mode Function
- Added the function in mode.js
- wrote the test cases.
2015-08-04 02:32:21 -04:00
jos
b7b4669935 Conversions after merging develop into v2 2015-06-07 15:57:58 +02:00
jos
a92b978036 Merged develop into v2 2015-06-07 15:57:41 +02:00
jos
d81fe279cc String input is now converted to numbers by default for all functions. Adding two strings will no longer concatenate them, but will convert the
strings to numbers and add them.
2015-05-19 22:18:40 +02:00
Max Bruckner
b50ed45c06 Use number configuration for return type of sum with empty array 2015-05-18 14:08:15 +02:00
Max Bruckner
1ef8f2986e sum: Fix #369 return 0 for empty array 2015-05-17 21:18:14 +02:00
Favian Contreras
fbfbd030d1 Removed the ability to insert data as a series of scalar values. Consolidated sorted and normal cases into 1 file. Added ability to use a list of probabilities, or an integer as a number of would be evenly spaced probabilities. 2015-05-14 08:06:38 -07:00
Favian Contreras
ae3267d5b8 Basic quantile implementation and tests (see issues #305 and #354). There is also an implementation that assumes the input is sorted in ascending order, to maintain an O(1) runtime. 2015-05-12 03:04:51 -07:00
Max Bruckner
8d1d20ba2e Merge branch 'develop' into v2 2015-04-27 09:14:50 +02:00
Max Bruckner
32d507d123 functions/statistics/median: test for issue (#309)
This is a test to check that median doesn't mutate it's input
2015-04-26 00:07:29 +02:00
jos
6e96d5a808 Merge branch 'develop' into v2
Conflicts:
	HISTORY.md
	bower.json
	component.json
	dist/math.js
	dist/math.map
	dist/math.min.js
	lib/function/arithmetic/abs.js
	lib/function/probability/gamma.js
	lib/version.js
	package.json
2015-04-22 21:43:56 +02:00