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

Method div

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

Source from the content-addressed store, hash-verified

708 */
709 div(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame
710 div(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void {
711 const { inplace, axis } = { inplace: false, axis: 1, ...options }
712
713 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
714 throw Error("TypeError: div operation is not supported for string dtypes");
715 }
716
717 if ([0, 1].indexOf(axis) === -1) {
718 throw Error("ParamError: Axis must be 0 or 1");
719 }
720
721 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
722 return this.$MathOps(tensors, "div", inplace)
723
724
725 }
726
727 /**
728 * Return division of DataFrame with other, returns 0 if denominator is 0.

Callers

nothing calls this directly

Tested by

no test coverage detected