astropy/astropy — pull request #2327 by mhvk (2014-04-16 02:24:29+00:00)
Title: Provide np.broadcast_arrays replacement that allows subclasses

In the work on the representation classes for coordinates [1], it was realised that `np.broadcast_arrays` casts all inputs as `ndarray`, leading to again questions whether we should provide "improved" versions of numpy routines (see #1274). In this particular case, there seemed to be no reason that subclasses would be a problem, so I submitted an enhancement PR to numpy [2]. Since even if merged that will not be available in older versions of `numpy`, I also made an `astropy` version, as part of a new `astropy.utils.numpy` package. I tried to implement a type of organisation that would only override what is not correct, and would also allow us to easily test whether the overrides were still necessary. Probably most needed are comments on this framework!

[1] https://github.com/eteq/astropy/pull/10
[2] https://github.com/numpy/numpy/pull/4622