On Tue, 18 Apr 2017, Allin Cottrell wrote:
On Tue, 18 Apr 2017, Sven Schreiber wrote:
> Am 18.04.2017 um 16:16 schrieb Riccardo (Jack) Lucchetti:
>>
>> But I believe that the most sensible outcome of "mshaping" an empty
matrix
>> would be another empty matrix.
>
> Fine with me, too.
I think I'd prefer to throw an error. Wouldn't returning an empty matrix
break the promise to give a matrix with the specified dimensions?
The doc says, "Rearranges the elements of X into a matrix with r rows and c
columns." If X has no elements the job can't be done.
True. Let's go with the error.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------