MAINT: Make take_1d accept readonly buffers.
This is a port of @ogrisel's fix in  #10070 to deal with 1d arrays. There's absolutely nothing new here beyond what's in the original patch.

closes #11502 
