I'm having trouble understanding one of the examples in NuVoc dealing with the derivative conjunction. It comes up in the third of the common uses section.
This sets out a verb that calculates 3 values from a list. The verb is f =: (<./ , (+/ % #) , >./)@, and the sample data x =: 2 4 $ 3 1 2 5 2 3 7 4 I have no problem with the rank 2 application of the verb to the data. $f"2 x 3 or with the derivative of the rank 2 application of the verb to the data $f"2 D.1 x 2 4 3 For the verb alone, the matrix gets raveled and the 3 values are calculated as a list. For the derivative, the result is a list of 3 sensitivities, one for each of the atoms in the matrix argument. The result has shape 2 4 3 which is in accordance with the definition in the dictionary: the rank of the result will be r+a where a is the argument rank and r is the rank of the result of appyling the verb to the argument. My problem comes with the next bit where the verb is applied to cells of rank 1 as in f"1 x 1 2.75 5 2 4 7 This looks fine. There are 2 lists in the argument, each of which produces a list of length 3. The result is rank 2 with a shape of 2 3. So when the derivative is taken I would expect a result of shape 2 4 2 3 not $f"1 D.1 x 2 4 3 The shape of this result seems not to jive with that stated in the dictionary. The rank of the argument is 2 as is the rank of the result. Total 4. Your guidance appreciated. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
