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

Method pow

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

Source from the content-addressed store, hash-verified

426 */
427 pow(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series
428 pow(other: Series | number | Array<number>, options?: { inplace?: boolean }): Series | void {
429 const { inplace } = { inplace: false, ...options }
430
431 if (this.dtypes[0] == "string") ErrorThrower.throwStringDtypeOperationError("pow")
432
433 const newData = _genericMathOp({ ndFrame: this, other, operation: "pow" })
434
435 if (inplace) {
436 this.$setValues(newData as ArrayType1D)
437 } else {
438 return utils.createNdframeFromNewDataWithOldProps({ ndFrame: this, newData, isSeries: true }) as Series
439 }
440 }
441
442 /**
443 * Return Modulo of series and other, element-wise (binary operator mod).

Callers

nothing calls this directly

Calls 3

_genericMathOpFunction · 0.90
$setValuesMethod · 0.80

Tested by

no test coverage detected