Actually, J does support arrays of nothing.  That's what i.0 is, after
all. And, if you want a scalar containing an array of nothing, then a:
matches that specification.

And we have an algebra here - though if (as in your previous message)
you do multiplication and call it addition, this becomes very
difficult to talk about.

That said, remember that we can add an arbitrary number of leading 1
dimensions to any array without changing the number of elements in
that array.

Thanks,

-- 
Raul


On Wed, Dec 20, 2017 at 4:03 AM, Erling Hellenäs
<[email protected]> wrote:
> Hi all !
>
> Could we avoid doing these peculiar things in the rank operator if we
> enabled the handling of arrays of nothing?
>
> The verb injected in Rank would then have to give a valid result for an
> array of nothing?
>
> For this to happen J functions have to be defined for handling arrays of
> nothing?
>
> Would it be possible to define an algebra for the handling of arrays of
> nothing?
>
> Could this be the same as enabling missing data?
>
> Cheers,
>
> Erling
>
>
>
> Den 2017-12-20 kl. 09:46, skrev Erling Hellenäs:
>>
>> This is a mathematical concept:
>> https://en.wikipedia.org/wiki/Empty_product /Erling
>>
>>
>> Den 2017-12-20 kl. 09:39, skrev Erling Hellenäs:
>>>
>>> */i.0
>>>
>>> 1
>>>
>>> Here the interpreter automatically adds a 1 to get this peculiar result.
>>>
>>> /Erling
>>>
>>> Den 2017-12-19 kl. 20:01, skrev Raul Miller:
>>>>
>>>> An empty tank zero array would be inconsistent.
>>>>
>>>> The number of elements in an array is the product of its dimensions, and
>>>> the multiplicative identity is 1, not 0.
>>>>
>>>> Thanks,
>>>>
>>>
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to