So I’d also misunderstood when amend-in-place applies.  I’d thought it was sufficient
to ensure the lhs array name was the same as the name of the source array!

Back to the dictionary.

And, for Raul, both time & space show improvement in Henry's example:

    ts

6!:2 , 7!:2@]


   ts'r =. l (<a:;1 2)} r'
4.1e_6 1856
   ts'r =. l 1 2}"1 r'
2.25e_5 165760

Cheers,

Mike

On 28/04/2022 23:20, Henry Rich wrote:
Gagging the critic, eh?  It's just trying to help:

   r =. i. 3 4000
   l =. i. 3 2
   7!:2 'r =. l 1 2}"1 r'
165696
   7!:2 'r =. l (<a:;1 2)} r'
1856

Henry Rich

On 4/28/2022 6:08 PM, 'Michael Day' via Beta wrote:
I've just encountered this rather surprising instance of the error message.

   (i.3 2) 1 2}"1 i.3 4
(004) m}"n should be executed without " using leading axes of a: in m
0 0 1  3
4 2 3  7
8 4 5 11

However,  this works without any grumbling:
   1 2{"1 i.3 4
1  2
5  6
9 10

This is an example I've cooked up for this report;  the actual line of code
is slightly more interesting:  I'm trying to replace some columns in an
matrix with new values.  Actually it's Fannkuch -flipping the first few
columns!  I was looking at my code after yesterday's post re fannkuch redux.

I've killed the message now,  with  9!:55 ] 1e6 ; 4

   JVERSION
Engine: j904/j64avx2/windows
Beta-b: commercial/2022-04-12T18:59:13
Library: 9.04.01
Qt IDE: 2.0.3/6.2.4(6.2.4)
Platform: Win 64
Installer: J904 install
InstallPath: c:/d/j904-beta
Contact: www.jsoftware.com

Thanks,

Mike





--
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to