MulaiMulai sekarang secara gratis

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.

Latihan ini adalah bagian dari kursus

Introduction to NumPy

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Create an array of the first 100 trunk diameters from tree_census
hundred_diameters = ____
print(hundred_diameters)
Edit dan Jalankan Kode