h5py/h5py — pull request #260 by andrewcollette (2013-01-20 21:40:40+00:00)
Title: Fix handling of top-level array types (issue 211)

Array types (e.g. np.dtype("(3,)f")) as top-level types have been broken for a long time now (issue #211 ) This pull request fixes code in dataset.py which did not perform extensive enough checking of void types, incorrectly sweeping up array types with compound types. Array types can now be created, read, written and sliced.

Scalar broadcasting (array[...] = number) is very hard to get right in this case because of how NumPy mangles top-level array types: e.g. numpy.ones((10,), dtype='(3,)i').dtype == int32.

For this reason, we now raise TypeError (rather than NotImplementedError) when scalar broadcasting is attempted, and this feature is specifically categorized as unsupported, instead of broken.