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

Method mul

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

Source from the content-addressed store, hash-verified

679 */
680 mul(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame
681 mul(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void {
682 const { inplace, axis } = { inplace: false, axis: 1, ...options }
683
684 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
685 throw Error("TypeError: mul operation is not supported for string dtypes");
686 }
687
688 if ([0, 1].indexOf(axis) === -1) {
689 throw Error("ParamError: Axis must be 0 or 1");
690 }
691 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
692 return this.$MathOps(tensors, "mul", inplace)
693
694
695 }
696
697 /**
698 * Return division of DataFrame with other.

Callers

nothing calls this directly

Tested by

no test coverage detected