jsdataframe.js
function enforceVectorDtype(array, dtype) {
  validateDtype(dtype);
  var coerceFunc = COERCE_FUNC[dtype];

  // Coerce all elements to dtype
  for (var i = 0; i < array.length; i++) {
    array[i] = coerceFunc(array[i]);
  }

  // Construct vector
  return newVector(array, dtype);
}
function enforceVectorDtype(array, dtype) {
  validateDtype(dtype);
  var coerceFunc = COERCE_FUNC[dtype];

  // Coerce all elements to dtype
  for (var i = 0; i < array.length; i++) {
    array[i] = coerceFunc(array[i]);
  }

  // Construct vector
  return newVector(array, dtype);
}
function enforceVectorDtype ( array , dtype ) { validateDtype ( dtype ) ; var coerceFunc = COERCE_FUNC [ dtype ] ; // Coerce all elements to dtype for ( var i = 0 ; i < array . length ; i ++ ) { array [ i ] = coerceFunc ( array [ i ] ) ; } // Construct vector return newVector ( array , dtype ) ; }
Creates a new vector backed by the given array after coercing each element to the given dtype.
Creates a new vector backed by the given array after coercing each element to the given dtype .