Index Ai Academy
Glossary · Phase 0 · Tools

Keepdims

An option that keeps the reduced axis as size 1, so a result of shape (4, 1) can line up with the original (4, 3) array.

Try it now

A reshape doesn't copy the numbers: b is another way of reading the same block as a.

Learn it properly

NumPy in practice: shapes, types and picking values · Reshape, view and copy, where and clip, top-k, stacking and the (N, C, H, W) batch a model expects. About 35 minutes.

Other terms from the same lesson

  • copy: A new array with its own memory. Changing a copy never changes the array it came from.
  • mask: An array of True and False values used to pick or block entries: a[mask] keeps only the places that are True.
  • view: A NumPy array that looks at the same memory as another array, so changing one changes the other. Slicing and reshape usually give views.
Keep learning

More in plain English.

1286 terms in the glossary, each with the lesson that teaches it.

1286 terms

The glossary

Every word you'll meet in AI and machine learning, explained in everyday language.

Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write