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

Method divNoNan

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

Source from the content-addressed store, hash-verified

738 */
739 divNoNan(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame
740 divNoNan(other: DataFrame | Series | number[] | number, options?: { axis?: 0 | 1, inplace?: boolean }): DataFrame | void {
741 const { inplace, axis } = { inplace: false, axis: 1, ...options }
742
743 if (this.$frameIsNotCompactibleForArithmeticOperation()) {
744 throw Error("TypeError: div operation is not supported for string dtypes");
745 }
746
747 if ([0, 1].indexOf(axis) === -1) {
748 throw Error("ParamError: Axis must be 0 or 1");
749 }
750
751 const tensors = this.$getTensorsForArithmeticOperationByAxis(other, axis);
752 return this.$MathOps(tensors, "divNoNan", inplace)
753
754
755 }
756
757 /**
758 * Return DataFrame raised to the power of other.

Callers

nothing calls this directly

Tested by

no test coverage detected