Navbar menu
(Move to ...)
Home
Python
HTML
JavaScript
Quiz
AS400 / IBM iSeries
Contact Us
▼
HackerRank Python Solution - Numpy Topic - Mean, Var, and Std
›
Mean: The mean tool computes the arithmetic mean along the specified axis. import numpy my_array = numpy.array([ [1, 2], [3, 4] ]) print...
HackerRank Python Solution - Numpy Topic - Min and Max
›
Min: The tool min returns the minimum value along a given axis. import numpy my_array = numpy.array([[2, 5], [3,...
HackerRank Python Solution - Numpy Topic - Sum and Prod
›
Sum: The sum tool returns the sum of array elements over a given axis. import numpy my_array = numpy.array([ [1, 2], [3, 4] ]) print num...
HackerRank Python Solution - Numpy Topic - Floor, Ceil and Rint
›
Floor: The tool floor returns the floor of the input element-wise. The floor of x is the largest integer i where i<=x. import numpy my...
HackerRank Python Solution - Numpy Topic - Shape and Reshape
›
Shape: The shape tool gives a tuple of array dimensions and can be used to change the dimensions of an array. (a). Using shape to get array...
HackerRank Python Solution - Numpy Topic - Array Mathematics
›
Basic mathematical functions operate elementwise on arrays. They are available both as operator overloads and as functions in the NumPy modu...
HackerRank Python Solution - Numpy Topic - Eye and Identity
›
Identity: The identity tool returns an identity array. An identity array is a square matrix with all the main diagonal elements as 1 and the...
HackerRank Python Solution - Numpy Topic - Zeros and Ones
›
Zeros: The zeros tool returns a new array with a given shape and type filled with 0's. import numpy print numpy.zeros((1,2)) ...
HackerRank Python Solution - Numpy Topic - Concatenate
›
Concatenate: Two or more arrays can be concatenated together using the concatenate function with a tuple of the arrays to be joined: impo...
HackerRank Python Solution - Numpy Topic - Transpose and Flatten
›
Question 2 - Transpose and Flatten Task You are given an NxM integer array matrix with space-separated elements (N= rows and M= columns). Th...
HackerRank Python Solution - Numpy Topic - Arrays
›
Question1 - Arrays: Task You are given a space-separated list of numbers. Your task is to print a reversed NumPy array with the element ty...
‹
›
Home
View web version