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

Method mul

src/danfojs-base/core/series.ts:348–360  ·  view source on GitHub ↗
(other: Series | number | Array<number>, options?: { inplace?: boolean })

Source from the content-addressed store, hash-verified

346 */
347 mul(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series
348 mul(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series | void {
349 const { inplace } = { inplace: false, ...options }
350
351 if (this.dtypes[0] == "string") ErrorThrower.throwStringDtypeOperationError("mul")
352
353 const newData = _genericMathOp({ ndFrame: this, other, operation: "mul" })
354
355 if (inplace) {
356 this.$setValues(newData as ArrayType1D)
357 } else {
358 return utils.createNdframeFromNewDataWithOldProps({ ndFrame: this, newData, isSeries: true }) as Series
359 }
360 }
361
362 /**
363 * Return division of series and other, element-wise (binary operator div).

Callers

nothing calls this directly

Calls 3

_genericMathOpFunction · 0.90
$setValuesMethod · 0.80

Tested by

no test coverage detected