Mathjs: Possible error in the documentation for math.nthRoots(x)

Created on 13 May 2020  路  3Comments  路  Source: josdejong/mathjs

Hi,

I am trying to use math.nthRoots(x) for matrices but it seems not working. The documentation says it takes the inputs "number | BigNumber | Fraction | Complex | Array | Matrix", but when I use matrices, system throws error "Uncaught TypeError: Unexpected type of argument in function nthRoots (expected: Complex or number or Fraction or string or BigNumber, actual: Matrix, index: 0)"

Also, it seems the parameter description, return value description are incorrect.

Please look into it. Thank you.

Best regards

bug

All 3 comments

Thanks for bringing this up, it's an error in the documentation indeed. The implementation only supports scalars: https://github.com/josdejong/mathjs/blob/develop/src/function/arithmetic/nthRoots.js#L39-L43

Docs are fixed now in v7.0.1

Thank you.

Was this page helpful?
0 / 5 - 0 ratings