moving flattening from parakeet to c repr