Closed jwittenbach closed 8 years ago
@freeman-lab: I want to use this to make the handling of non-2D arrays nice and straight-forward in Thunder Factorization. Seemed general enough to include directly in Thunder. Thoughts?
Cool, seems reasonable, is this the only case where the thunder API directly references keys
and values
? That's the only thing that concerns me a bit. If we've avoided that so far, might not want to introduce it just for this. Other options, off the top of my head:
reshape
but it's confusing if they do different thingsreshape
method to series
, because for images you can always do reshaping via a map
operation, but that doesn't work for "reshaping" the keys in series
dataOther ideas?
Yeah, I also thought about just calling it reshape
, but decided it was too confusing. We do mention "values" in a couple of places (e.g. value_shape
), but there is no equivalent for "keys", which makes things tricky.
@freeman-lab updated things to reflect our conversation yesterday...both Images
and Series
now have a reshape
function with a simpler API that just takes the new shape, and then catches invalid reshapes.
Nice @jwittenbach , this looks great! Merging in.
implements #335 for
Series
and a corresponding function forImages