Skip to content

Latest commit

 

History

History

shape-reshape

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Shape and Reshape

https://www.hackerrank.com/challenges/np-shape-reshape

Problem

The shape tool gives a tuple of array dimensions and can be used to change the dimensions of an array.

Task

You are given a space separated list of nine integers. Your task is to convert this list into a 3X3 NumPy array.

Input Format

A single line of input containing 9 space separated integers.

Output Format

Print the 3X3 NumPy array.

Sample Input 0

1 2 3 4 5 6 7 8 9

Sample Output 0

[[1 2 3]
 [4 5 6]
 [7 8 9]]

My Solution