Question: Consider the array A. Write a program that computes the array B by computing the natural logarithm of all the elements of A whose value
Consider the array A.

Write a program that computes the array B by computing the natural logarithm of all the elements of A whose value is no less than 1, and adding 20 to each element that is equal to or greater than 1. Do this in two ways:
a. By using a for loop with conditional statements.
b. By using a logical array as a mask.
3 -4 A = - 8 -1 33 -17 - 17 6. - 9
Step by Step Solution
3.39 Rating (155 Votes )
There are 3 Steps involved in it
a Here is a Python program that computes the array B using a for loop with conditional statements import numpy as np import math A nparray35481331769 ... View full answer
Get step-by-step solutions from verified subject matter experts
