blend the cells in array1[1 2 3 4; 3 4 5 6;1 10 100 1000] and array2[1 2 3 4; 6
ID: 3648643 • Letter: B
Question
blend the cells in array1[1 2 3 4; 3 4 5 6;1 10 100 1000] and array2[1 2 3 4; 6 5 4 3; 0 0 0 0] based on the blend value (90%) where the blend value is the % of array1 values the remaining % is from the array2values.
Explanation / Answer
>>> from numpy import * >>> a = arange(15).reshape(3, 5) >>> a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14]]) >>> a.shape (3, 5) >>> a.ndim 2 >>> a.dtype.name 'int32' >>> a.itemsize 4 >>> a.size 15 >>> type(a) numpy.ndarray >>> b = array([6, 7, 8]) >>> b array([6, 7, 8]) >>> type(b) numpy.ndarray
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.