[GSoC|D3] NMatrix method equal to Numpy.meshgrid

29 views
Skip to first unread message

Naoki Nishida

unread,
Jun 30, 2014, 9:02:04 AM6/30/14
to sciru...@googlegroups.com
Hi All,

I am now expanding Ruby front-end of my GSoC project and trying to integrate it with other SciRuby components. Then I have a question about NMatrix.

I would like to use methods like Numpy.meshgrid[0] in Ruby. It do not do so complex things, but it is convenient when we generate plots like vector field[1] or 3D plot[2].

I read documents of NMatrix, but I cannot find the word 'meshgrid' in it. Does it already have methods equal to Numpy.meshgrid?

Regards,
Naoki


Carlos Agarie

unread,
Jun 30, 2014, 11:29:31 AM6/30/14
to sciru...@googlegroups.com
Hi Naoki,

We don't have a NMatrix#meshgrid function, but it should be similar to the NMatrix#linspace (and #logspace) shortcuts, which can be found in:

https://github.com/SciRuby/nmatrix/blob/master/lib/nmatrix/shortcuts.rb#L596-L606

If anyone is interested in writing NMatrix#meshgrid, feel free to send a pull request. :)


-----
Carlos Agarie
Software Engineer
+55 11 97320-3878 | @carlos_agarie


--
You received this message because you are subscribed to the Google Groups "SciRuby Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sciruby-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Naoki Nishida

unread,
Jul 5, 2014, 9:37:25 AM7/5/14
to sciru...@googlegroups.com
Hi Carlos,

Thank you for your reply. 

I tried to implement NMatrix#meshgrid, but I cannot finish it because of my lack of knowledge on NMatrix.
There is unfinished code on GitHub, and could you look over it if you have time?


Naoki


2014年7月1日火曜日 0時29分31秒 UTC+9 Carlos Agarie:
Reply all
Reply to author
Forward
0 new messages