one more utility method for converting double array to integer array