MCPcopy Index your code
hub / github.com/javascriptdata/danfojs / pow

Method pow

src/danfojs-base/core/frame.ts:770–785  ·  view source on GitHub ↗
(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean })

Source from the content-addressed store, hash-verified

768 */
769 pow(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame
770 pow(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void {
771 const { inplace, axis } = { inplace: false, axis: 1, ...options }
772
773 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
774 throw Error("TypeError: pow operation is not supported for string dtypes");
775 }
776
777 if ([0, 1].indexOf(axis) === -1) {
778 throw Error("ParamError: Axis must be 0 or 1");
779 }
780
781 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
782 return this.$MathOps(tensors, "pow", inplace)
783
784
785 }
786
787 /**
788 * Return modulus between DataFrame and other.

Callers

nothing calls this directly

Tested by

no test coverage detected