BUG: Support ndim=0 when constructing arrays from buffer

Previously the buffer was interpreted as 1-dimensional when
no shape was provided, even when ndim was 0.

Closes gh-4015