Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
I am getting this warning when I try to create the new study_minutes array:
<ipython-input-81-f1dabc6571fc>:1: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray study_minutes = np.array([
I used the same code as presented in the video but it's not creating the same shaped array (2, 100)
Code: study_minutes = np.array([ study_minutes, np.zeros(100, np.uint16) ])
Megan AmendolaTreehouse Teacher
This comes from an update to NumPy. It wants you to now input it as:
study_minutes = np.array([ study_minutes, np.zeros(100, np.uint16)], dtype=object)
Which version of NumPy are you using at the moment? You can run
print(np.__version__) inside of your Jupyter Notebook to see.
Evert-Jan van Dijk1,381 Points
Never mind it's already been solved, I had forgotten to run all the previous code, since I started a new session.