Jeremy Howard wrote:
>
> 148: Change to Numeric Python semantics of reshape(), or write counter-RFC
> specifying these semantics (preferably renaming this RFC's 'reshape' to
> something else)
> I'm happy to work on 204, 82, 90/91, and 148 (Nate--I don't think we've
> resolved this one yet...).
The main thing I like about RFC 148's reshape over NumPy's is that it
serves as a general-purpose operator - like splice - off of which all
other operators can be based. That's pretty cool.
There are a couple things that the NumPy one lacks that RFC 148
currently has:
1. Arbitrary Interleaving
2. A way to specify multiple @arrays, i.e.
@new = reshape $x,$y,$i, @a, @b, @c; # RFC 148
Now, if we're looking for a new, more compact syntax, let's make arg one
an arrayref of dimensions:
@new = reshape [$x,$y,$i], @a, @b, @c;
That looks remarkably similar to NumPy's, plus it can take multiple
arrays, even defaulting to @_. And I can change the "wildcard" from 0 to
-1, just like NumPy's.
Sound good?
-Nate