LoslegenKostenlos loslegen

Bike traffic throughout the week

In 2012, the City of Seattle installed meters to count bicycles crossing the Fremont Bridge, a major thoroughfare for cyclists commuting to downtown Seattle from the northern neighborhoods.

A 2D NumPy array called bike_traffic is loaded, which contains the average number of cyclists that were counted crossing the Fremont Bridge during each hour of the day for each day of the week from Oct 2012 to mid-June 2018.

  • Each column is a day of the week, starting on Monday.
  • Each row is an hour of the day, beginning with the 12am-1am hour.

Don't forget that indexing in Python is a bit different from MATLAB:

  • Python indexing starts at 0, not 1
  • In Python, you can use negative indices: -1 is equivalent to MATLAB's end

Diese Übung ist Teil des Kurses

Python for MATLAB Users

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Print the shape of bike traffic
print(bike_traffic.____)
Code bearbeiten und ausführen