split data array into label scalar and features array