BaşlayınÜcretsiz Başlayın

Stepping into 2D

Now assume that your research requires you to take an admittedly unrepresentative sample of trunk diameters, which are located in the third column of tree_census. Getting just a selection of trunk diameters can be done with NumPy's slicing and stepping functionality.

numpy is loaded as np, and the tree_census 2D array is available.

Bu egzersiz

Introduction to NumPy

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Create an array of the first 100 trunk diameters from tree_census
hundred_diameters = ____
print(hundred_diameters)
Kodu Düzenle ve Çalıştır