PDLPorters / pdl

Scientific computing with Perl
http://pdl.perl.org
Other
91 stars 46 forks source link

Make NumPy intro doc (from TODO) #361

Open mohawk2 opened 2 years ago

mohawk2 commented 2 years ago

Similar to PDL::MATLAB (and the various intro/conversion documents probably all need to become PDL::Intro::*)

mohawk2 commented 2 years ago

@dkogan Do I remember right you have expertise in this? Are there any good "intro to NumPy" docs you can recommend so I'd know where NumPy folks would start from?

dkogan commented 2 years ago

Hi.

I don't have any "intro to numpy" docs in mind. Sorry. When moving from PDL to numpy, it became very clear to me that the core PDL functionality was far superior to what numpy has. So I wrote two modules to make the core numpy experience not suck:

This isn't strictly what you were asking, but it's the best I got.

mohawk2 commented 2 years ago

Thanks for your quick response! And your answer was what I needed, which is better than what I asked for :-)

mohawk2 commented 2 years ago

My thinking is I'll take the MATLAB doc, and take the semantic inverse of your numpysane doc, and that should largely do it. Thank you!

As noted in #358 my thinking was to make PDL be more of a C library with a Perl interface so one could also make e.g. a Python interface. As someone who seems to have largely done that already with your module, does this seem to you like it has value?

duffee commented 2 years ago

For someone looking for a bit of inspiration on the conversion between Numpy and PDL, I forked "Joe"s 100 PDL Exercises which have 64 examples of how a task is done in both Numpy and PDL (some are trivial). I thought I'd progressed it a bit, but it looks the same as Joe's. I should get back to it.