@aryth/rank-matrix
Advanced tools
Comparing version 0.1.4 to 0.1.7
@@ -19,5 +19,5 @@ 'use strict'; | ||
flat = flat.sort(comparer); | ||
return matrixMapper.mapper(mx, x => flat.indexOf(x)); | ||
return matrixMapper.mapper(mx, x => (x = flat.indexOf(x)) >= 0 ? x : NaN); | ||
}; | ||
exports.rank = rank; |
@@ -15,5 +15,5 @@ import { mapper } from '@vect/matrix-mapper'; | ||
flat = flat.sort(comparer); | ||
return mapper(mx, x => flat.indexOf(x)); | ||
return mapper(mx, x => (x = flat.indexOf(x)) >= 0 ? x : NaN); | ||
}; | ||
export { rank }; |
{ | ||
"name": "@aryth/rank-matrix", | ||
"version": "0.1.4", | ||
"version": "0.1.7", | ||
"description": "Return ranks of each element in a 2-d array", | ||
@@ -35,3 +35,3 @@ "main": "dist/index.cjs.js", | ||
"homepage": "https://github.com/hoyeungw/aryth#readme", | ||
"gitHead": "2c0b384c43dbc6ffd24cb7d4d839bae7883d8ca5" | ||
"gitHead": "368b5d3dedb249b0aabd6bbe3fb76f6eb738d62f" | ||
} |
@@ -0,0 +0,0 @@ # @aryth/rank-matrix |
Sorry, the diff of this file is not supported yet
4927