AITeky Learn

AiTeky Original Interactive Learning & Practice Beginner

NumPy: work with whole lists of numbers at once

Add, compare and summarise thousands of numbers in one line instead of a loop. Pandas, charts and machine learning are all built on it.

In Python basics you added up a week of sales with a loop, one value at a time. That works for seven numbers. A bank has seven crore transactions. A weather station records a reading every second. A photo is a few million numbers. For work like that, Python uses NumPy: a that does maths on a whole list of numbers in one go, and very fast.

You only need the Python basics course before this one. We use everyday examples, like a shop's price list, an electricity bill, a class marks register and a week of rainfall, and you run every line right here on this page.

  • Learn lessons explain one idea at a time, with small exercises you can try again and again.
  • Industry ready lessons give you the kind of messy readings and files you will get at work, and the interview questions that go with them.

Pandas, the charts course and every machine learning library use NumPy underneath, so this is time well spent.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 20 min Free sample πŸ”’ AiTeky Pass Meet NumPy: change a whole price list in one line Turn a Python list into a NumPy array and do maths on every value at once, with no loop. See why every data and AI tool is built on it.
  2. 02 20 min πŸ”’ AiTeky Pass Maths between two arrays: a whole bill in one line Multiply quantities by prices, compare this month with last month, and add one number to every value, all without a loop.
  3. 03 20 min πŸ”’ AiTeky Pass Summaries in one word: total, average, highest, lowest Sum, average, highest and lowest values, the day each happened and a running total, each in one short word on a whole array.
  4. 04 20 min πŸ”’ AiTeky Pass Pick and slice: one value, a week, or every seventh day Take out one value by its position, a run of values with a slice, and every nth value with a step. Fix a wrong reading, and avoid a trap that changes your data by accident.
  5. 05 25 min πŸ”’ AiTeky Pass Keep only what passes a test: rainy days, big bills Ask a question of every value at once, get True or False for each, and keep only the True ones. Count them, add them up, and combine two tests.
  6. 06 25 min πŸ”’ AiTeky Pass Tables of numbers: rows, columns and axis Store a table of numbers as a 2D array, read its shape, pick a row, a column or one cell, and get totals for every row or every column in one line.
  7. 08 20 min πŸ”’ AiTeky Pass Make arrays quickly: counting, filling and folding Make number ranges, arrays of zeros or a fixed amount, and evenly spaced values without typing them, then fold a long array into rows and columns with reshape.
  8. 09 25 min πŸ”’ AiTeky Pass Random numbers: roll dice, pick winners, and try it ten thousand times Make random numbers you can repeat with a seed, pick lucky-draw winners, and answer "how likely is it?" by simulating thousands of tries in a second.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 07 30 min πŸ”’ AiTeky Pass On the job: clean a day of sensor readings Real machines log gaps and error codes. Find them, mark them as missing, work out honest averages, and flag the hours that broke the rule. Then practise the interview questions.
  2. 10 35 min πŸ”’ AiTeky Pass On the job: a week of shop visitors, hour by hour Load a real file of customer counts into a 2D array, find the busiest day and hours, compare weekdays with the weekend, and answer a store manager's staffing question. Then practise the interview questions.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in