Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 7 subjective questions Operations on NumPy arrays

ECAP776 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define array manipulation in NumPy. Explain any four commonly used array-manipulation operations with examples.

  2. Question 2 of 20

    Explain the NumPy reshape() operation. What condition must be satisfied when an array is reshaped?

  3. Question 3 of 20

    Distinguish between NumPy's flatten() and ravel() methods.

  4. Question 4 of 20

    Describe transposition and axis permutation in NumPy. Compare arr.T, np.transpose(), and np.swapaxes().

  5. Question 5 of 20

    Explain how arrays are joined using np.concatenate(), np.stack(), np.vstack(), and np.hstack().

  6. Question 6 of 20

    Describe array splitting in NumPy using np.split(), np.array_split(), np.hsplit(), and np.vsplit().

  7. Question 7 of 20

    What is broadcasting in NumPy? State and explain its compatibility rules.

  8. Question 8 of 20

    Derive the broadcasted output shape for arrays with shapes and . Explain the comparison axis by axis.

  9. Question 9 of 20

    Explain row-wise and column-wise broadcasting for a matrix of shape . Give one compatible vector shape for each case.

  10. Question 10 of 20

    Describe how np.newaxis and np.expand_dims() help control broadcasting.

  11. Question 11 of 20

    Compare implicit broadcasting with np.broadcast_to() and np.tile().

  12. Question 12 of 20

    Explain the advantages and possible limitations of broadcasting in numerical programs.

  13. Question 13 of 20

    Explain NumPy's arithmetic binary operators and describe how they behave when applied to arrays.

  14. Question 14 of 20

    Distinguish between element-wise multiplication, matrix multiplication, and the dot product in NumPy.

  15. Question 15 of 20

    Describe comparison operators and boolean masks in NumPy. How can they be used to filter or modify an array?

  16. Question 16 of 20

    Why should and, or, and not generally not be used to combine NumPy boolean arrays? Explain the correct alternatives and operator-precedence requirement.

  17. Question 17 of 20

    Explain bitwise binary operators in NumPy and distinguish them from logical operations.

  18. Question 18 of 20

    What are in-place binary operations in NumPy? Discuss their benefits and the data-type issue that may occur.

  19. Question 19 of 20

    Explain NumPy universal functions and show how binary operators relate to binary ufuncs. Discuss the out and where parameters.

  20. Question 20 of 20

    Given an array of shape , determine whether operands with shapes , , , and can be broadcast with it. Justify each answer.

That's unit 7

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.