<@U5F0TT0UX> A lot of JVM-based linear algebra lib...
# science
t
@altavir A lot of JVM-based linear algebra libraries like ojAlgo don't have
pow()
functions. Not sure about Numpy. I don't know if it's inherently clear whether that a "dot pow" either, or just an element-wise pow() operation.
a
Well, in kmath the general logic is that operations are produced via context. The
MatrixContext
defines
dot
operation for any matrix so it is quite ease to extend it with power operations. It works like
context.run{ a dot b}
. The real matrix is a special case, where context is obvious and could be inferred. That is why
dot
operation is a top level. It slightly violates the general principle, but I can't think of a case where someone will need alternative dot operation on real matrices.
­čĹŹ 1