MCPcopy Create free account
hub / github.com/javascriptdata/danfojs / tensor

Method tensor

src/danfojs-base/core/generic.ts:166–172  ·  view source on GitHub ↗

* Converts and returns the data in the NDframe as a Tensorflow.js Tensor.

()

Source from the content-addressed store, hash-verified

164 * Converts and returns the data in the NDframe as a Tensorflow.js Tensor.
165 */
166 get tensor() {
167 if (this.$isSeries) {
168 return tensorflow.tensor1d(this.$data, this.$dtypes[0]);
169 } else {
170 return tensorflow.tensor2d(this.$data, this.shape, "float32")
171 }
172 }
173
174 /**
175 * Returns the dtypes of the columns

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected