NumPy Basic: Exercises, Practice, Solution
NumPy Basic [41 exercises with solution]
[An editor is available at the bottom of the page to write and execute the scripts.]
8. Write a NumPy program to test element-wise for complex number, real number of a given array. Also test whether a given number is a scalar type or not. Go to the editor
Click me to see the sample solution
Python Code Editor:
More to Come !
Do not submit any solution of the above exercises at here, if you want to contribute go to the appropriate exercise page.
Python: Tips of the Day
Returns a list of elements that exist in both lists, after applying the provided function to each list element of both.
def tips_intersection_by(a, b, fn): _b = set(map(fn, b)) return [item for item in a if fn(item) in _b] from math import floor print(tips_intersection_by([2.1, 1.2], [2.3, 3.4],floor))
- New Content published on w3resource :
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework