fix getting dtype (from ndarray, not memoryview)