function toArray1D(array) {
	  array = Array.isArray(array) ? new Float32Array(array) : array;
	  return tensor1d(array);
	}
A helper function transforms the two input types to an instance of Tensor1D,
so the return value can be fed directly into various TF.js Core functions.
@param array