(
arg: Array<T|TensorLike>, argName: string, functionName: string,
parseAsDtype: DataType|'numeric'|'string_or_numeric' = 'numeric')
| 131 | } |
| 132 | |
| 133 | export function convertToTensorArray<T extends Tensor>( |
| 134 | arg: Array<T|TensorLike>, argName: string, functionName: string, |
| 135 | parseAsDtype: DataType|'numeric'|'string_or_numeric' = 'numeric'): T[] { |
| 136 | if (!Array.isArray(arg)) { |
| 137 | throw new Error( |
| 138 | `Argument ${argName} passed to ${functionName} must be a ` + |
| 139 | '`Tensor[]` or `TensorLike[]`'); |
| 140 | } |
| 141 | const tensors = arg as T[]; |
| 142 | return tensors.map( |
| 143 | (t, i) => |
| 144 | convertToTensor(t, `${argName}[${i}]`, functionName, parseAsDtype)); |
| 145 | } |
no test coverage detected
searching dependent graphs…