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

Method mod

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

Source from the content-addressed store, hash-verified

798 */
799 mod(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame
800 mod(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void {
801 const { inplace, axis } = { inplace: false, axis: 1, ...options }
802
803 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
804 throw Error("TypeError: mod operation is not supported for string dtypes");
805 }
806
807 if ([0, 1].indexOf(axis) === -1) {
808 throw Error("ParamError: Axis must be 0 or 1");
809 }
810
811 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
812 return this.$MathOps(tensors, "mod", inplace)
813
814 }
815
816 /**
817 * Return mean of DataFrame across specified axis.

Callers

nothing calls this directly

Tested by

no test coverage detected