ftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of 'Pascal
Jasmin' via Programming
Sent: Friday, July 18, 2014 12:26 AM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] Discarding unneeded dimensions
the common way is {. i. 1 3 5
$ {. i. 1 3 5
3 5
a tr
Eeek, a very shrewd observation. I am still imvestigating Where it came from.
--- Original Message ---
From: "Raul Miller"
Sent: July 18, 2014 1:28 PM
To: "Programming forum"
Subject: Re: [Jprogramming] Discarding unneeded dimensions
As you've noticed, ,/ is a gre
As you've noticed, ,/ is a great way to combine the two leading dimensions.
But perhaps the best way is to go in and find where that 1 came from,
and fix the issue there.
Thanks,
--
Raul
On Fri, Jul 18, 2014 at 12:12 AM, Jon Hough wrote:
> If I have an array of shape 1 3 6, for example, but
the common way is {. i. 1 3 5
$ {. i. 1 3 5
3 5
a trick to remove all 1s
$ (, $~ 1 -.~ $) i. 1 3 1 5
3 5
- Original Message -
From: Jon Hough
To: programm...@jsoftware.com
Cc:
Sent: Friday, July 18, 2014 12:12:40 AM
Subject: [Jprogramming] Discarding unneeded dimensions
If I have an array of shape 1 3 6, for example, but I want to discard the 1, to
give shape 3 6, what is the best way to do so?
I found that doing ,/ on the array works.
--
For information about J forums see http://www.jsoftware.