Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2014-08-18

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
05:17 rindolf joined #pdl
16:15 vicash hello.. if i have a variable which has a value PDL::float/long/bool/ushort/double is there a way to check that the variable holds a PDL::* type vs say a string ?
16:41 vicash nevermind. Scalar::Util::blessed() solves it fo rme
17:15 sivoais maybe relevant to the C-object thing for PDL that has come up in pdl-porters: <https://phab.enlightenment.org/phame/live/1//post/yet_another_c_object_model_but_better/>
20:17 vicash hi. is there a way to take a pdl with dimension 10000 x 4 and add 1 more column of size 10000 to it ?
20:20 sivoais vicash: glue, append, cat
20:21 sivoais all are used to join piddles together in different ways
20:21 vicash cool
20:27 lungchin1 joined #pdl
20:27 osfamero1 joined #pdl
20:27 sivoais_ joined #pdl
20:31 Mithaldu joined #pdl
20:31 sivoais like
20:31 sivoais sequence(5,2)->reshape(5,5)
20:32 vicash sivoais.. i am using $a->glue(1, $b) where let $a = sequence(10, 4) and $b = ones(10)
20:32 vicash this seems to work as i want
20:32 sivoais sequence(5,2)->xchg(0,1)->reshape(2,8)->xchg(1,0)
20:32 sivoais yeah, that's fine
20:33 vicash thanks i will look at reshape and xchg too
20:34 sivoais The only reason one would go to the lengths of using the trickier reshape trick is if memory was issue
20:34 sivoais otherwise glue is easier to understand :-)
20:34 vicash i understand..
20:35 vicash so far it is only 100s of rows so it should be o
20:35 vicash ok
20:37 vicash sivoais: how do i create a pdl which has some BAD values.
20:37 vicash pdl('BAD', 1, 2) doesn't do it
20:37 vicash i am trying to change some R code which uses 'N/A'
20:38 sivoais wait, nvm. I misread the docs. reshape() might not save memory. I don't know if PDL uses realloc there
20:41 Bender1 joined #pdl
20:44 sivoais vicash: it appears that passing an array to pdl constructor doesn't handle the BAD string
20:44 sivoais but the string constructor does
20:44 sivoais pdl q[ BAD 1 2 ]
20:44 sivoais or... if you know the type you want
20:45 sivoais ($g = double( double->badvalue, 1, 2))->badflag(1);
20:46 sivoais or use setbadat
20:46 vicash ah ok
20:47 sivoais I'm working on trying to interop R with PDL. First step is to write a data frame implementation. I'm going to use BAD for NA there as well.
20:47 vicash cool
20:48 sivoais I really like R. It has some neat features. <http://adv-r.had.co.nz/> covers a bit of the type of metaprogramming you can do with it.
20:49 sivoais Though there are some things that are more difficult than they should be... gah, computers. :-)
20:53 vicash yea i agree
22:19 mohawk steal all the good ideas from R for PDL
22:20 mohawk chm, where's my dev release of PDL with my EU::D support patch? ;-)

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary