xy-scale 1.4.38 → 1.4.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xy-scale",
3
- "version": "1.4.38",
3
+ "version": "1.4.39",
4
4
  "main": "./index.js",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/datasets.js CHANGED
@@ -243,7 +243,7 @@ export const parseTrainingXY = ({
243
243
  let Y = [];
244
244
  const sourceIndexes = [];
245
245
 
246
- validateArray(arrObj, { min: 5 }, 'parseTrainingXY');
246
+ validateArray(arrObj, { min: 2 }, 'parseTrainingXY');
247
247
  validateFirstRow(arrObj[0]);
248
248
 
249
249
  for (let x = 0; x < arrObj.length; x++) {
@@ -416,7 +416,7 @@ export const parseProductionX = ({
416
416
  let X = [];
417
417
  let sourceIndexes = [];
418
418
 
419
- validateArray(arrObj, { min: 5 }, 'parseProductionX');
419
+ validateArray(arrObj, { min: 1 }, 'parseProductionX');
420
420
  validateFirstRow(arrObj[0]);
421
421
 
422
422
  if(yCallbackFunc != null) {
package/src/validators.js CHANGED
@@ -23,7 +23,7 @@ export const validateArray = (arr, {min = -Infinity, max = Infinity}, paramName)
23
23
 
24
24
  if(arr.length < min)
25
25
  {
26
- throw new Error(`Invalid property value. Array "${paramName}" expected at least ${max} items.`)
26
+ throw new Error(`Invalid property value. Array "${paramName}" expected at least ${min} items.`)
27
27
  }
28
28
  if(arr.length > max)
29
29
  {