Closed gbremer closed 7 years ago
In cell 24, an interation over a dictionary's keys and values fails with an attribute exception, that iteritems() is not available.
The code is --
import numpy for sex, weights in d.iteritems(): print(sex, numpy.log(weights).mean(), numpy.log(weights).std())
The exception is --
--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-24-31c478b07415> in <module>() 1 import numpy 2 ----> 3 for sex, weights in d.iteritems(): 4 print(sex, numpy.log(weights).mean(), numpy.log(weights).std()) AttributeError: 'dict' object has no attribute 'iteritems'
This fails with a new install of Anaconda Python 3.6, and succeeds in a new install of Python 2.7.
Closed with fix merged
In cell 24, an interation over a dictionary's keys and values fails with an attribute exception, that iteritems() is not available.
The code is --
The exception is --
This fails with a new install of Anaconda Python 3.6, and succeeds in a new install of Python 2.7.