Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: PDL & Math::MatrixReal

by Fletch (Bishop)
on Nov 05, 2021 at 16:27 UTC ( #11138476=note: print w/replies, xml ) Need Help??


in reply to PDL & Math::MatrixReal

Just because both classes are a representation of a matrix doesn't mean any method will work on it; you can't ask a cat to bark or a dog to meow.

Well, you can. Just not going to do anything as you've discovered.

Unless you've got a reason for switching back and forth you're going to need to pick a representation and use that one; sounds like for your particular application between your two choices Math::MatrixReal may support more of the operations you need natively. Otherwise your choices are to implement what you need using PDL (I'm not finding easy hits looking for "pdl matrix diagonalize"), or convert from the one to the other, get the diagonal, then convert back. The first option's likely to be more efficient, but if you only need to go back and forth once or twice it may be worth the performance hit to not have to bother reimplementing things.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11138476]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2022-08-19 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?