Comparing version 1.10.0 to 1.10.1
{ | ||
"name": "xdim", | ||
"version": "1.10.0", | ||
"version": "1.10.1", | ||
"description": "Multi-Dimensional Functions. Create, Query, and Transform Multi-Dimensional Data.", | ||
@@ -5,0 +5,0 @@ "main": "src/xdim.js", |
@@ -415,3 +415,3 @@ const layoutCache = {}; | ||
arr[i] = sub; | ||
addDims({ arr: sub, lens: lens.slice(1), arrayTypes }); | ||
addDims({ arr: sub, fill, lens: lens.slice(1), arrayTypes }); | ||
} | ||
@@ -426,3 +426,4 @@ } | ||
if (shape.length === 1) { | ||
const arrayType = arrayTypes ? arrayTypes[0] : "Array"; | ||
if (Array.isArray(arrayTypes) && arrayTypes.length !== 1) throw new Error("[xdim] shape and arrayTypes have different lengths"); | ||
const arrayType = Array.isArray(arrayTypes) ? arrayTypes[0] : "Array"; | ||
return new ARRAY_TYPES[arrayType](len).fill(fill); | ||
@@ -429,0 +430,0 @@ } |
52656
759