NumPy اسئلة واجوبة المقابلات
سؤال 11. Explain the differences between np.dot() and np.matmul() in NumPy.
np.dot() performs matrix multiplication for 2-D arrays, while np.matmul() is equivalent to the '@' operator and is more general.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 12. Create a diagonal matrix using NumPy.
import numpy as npnarr = np.diag([1, 2, 3])
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 13. Explain the purpose of np.meshgrid() in NumPy.
np.meshgrid() is used to create coordinate matrices from coordinate vectors, commonly used for 3D plotting.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 14. How to find the dimension of a NumPy array?
You can use the attribute 'ndim'. For example, if 'arr' is your array, use 'arr.ndim'.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
سؤال 15. What is the difference between 'np.zeros()' and 'np.ones()' in NumPy?
'np.zeros()' creates an array filled with zeros, while 'np.ones()' creates an array filled with ones.
هل هذا مفيد؟
اضف تعليقا
عرض التعليقات
الاكثر فائدة حسب تقييم المستخدمين:
- How to install NumPy?
- Create a NumPy array from a Python list.
- What is NumPy?
- What is the difference between 'np.zeros()' and 'np.ones()' in NumPy?
- What is the purpose of 'np.eye()' in NumPy?