thunder-project / thunder

scalable analysis of images and time series
http://thunder-project.org
Apache License 2.0
814 stars 184 forks source link

adds reshaping functions to Images and Series #343

Closed jwittenbach closed 8 years ago

jwittenbach commented 8 years ago

implements #335 for Series and a corresponding function for Images

jwittenbach commented 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?

freeman-lab commented 8 years ago

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:

Other ideas?

jwittenbach commented 8 years ago

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.

jwittenbach commented 8 years ago

@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.

freeman-lab commented 8 years ago

Nice @jwittenbach , this looks great! Merging in.