Применение math.ceil к массиву в PythonPython

Программы на Python
Anonymous
Применение math.ceil к массиву в Python

Сообщение Anonymous »

Как правильно применить math.ceil ко всему массиву? См. следующий код Python:

Код: Выделить всё

    index = np.zeros(len(any_array))
index2 = [random.random() for x in xrange(len(any_array))
##indexfinal=math.ceil(index2)  

Подробнее здесь: [url]https://stackoverflow.com/questions/30559170/applying-math-ceil-to-an-array-in-python[/url]

Вернуться в «Python»