in 【8】:type(bmi)
Out【8】:float
In 【9】:day_of_week = 5
In【10】:type(day_of_week)
Out【10】:int
Out【8】:float
In 【9】:day_of_week = 5
In【10】:type(day_of_week)
Out【10】:int
2017-01-19
>>> import numpy as np
>>> a = np.array([
... [1.73, 1.68, 1.71],
... [1, 2, 3, 4]
... ])
>>> a
array([[1.73, 1.68, 1.71], [1, 2, 3, 4]], dtype=object)
>>> a[0,2]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: too many indices for array
>>>
>>> a = np.array([
... [1.73, 1.68, 1.71],
... [1, 2, 3, 4]
... ])
>>> a
array([[1.73, 1.68, 1.71], [1, 2, 3, 4]], dtype=object)
>>> a[0,2]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: too many indices for array
>>>
2017-01-12