This is my 42th day of 100Daysofcode and python. Today I did some assignment on my old courses regarding to the topic regular expression. Learned more about algorithm. Practiced some code which were I already wrote.
And at the end of the day I learned about basic of numpy. I enjoyed on it. Tomorrow I will continue to learn about the same topic.
some code
While study I learned numpy helps to effectively loading, storing and manipulating data in memory in python. Data come from wide range of formats, including collections of documents, collections of images, collections of sound clip, collection of numerical measurement or nearly anything else.
import numpy as np
value = np.random.randint(0,10,(2,3))
value
Output is,
array([[6, 2, 7],
[9, 9, 6]])
value = np.random.randint(0,10,20)
value
array([4, 8, 1, 6, 0, 8, 9, 4, 1, 6, 9, 7, 6, 3, 2, 9, 2, 7, 7, 2])
value = np.random.rand(3,4)
value
array([[0.91465555, 0.99841031, 0.55547019, 0.57226342],
[0.96754427, 0.2398907 , 0.0672654 , 0.4947008 ],
[0.48353768, 0.06300809, 0.13866248, 0.73626242]])
x = np.array([1,2,3,4,5,6])
x<3
array([ True, True, False, False, False, False])
x<=3
array([ True, True, True, False, False, False])
rng = np.random.RandomState(0)
x = rng.randint(10,size=(3,4))
x
array([[5, 0, 3, 3],
[7, 9, 3, 5],
[2, 4, 7, 6]])
Day 42 of #100DaysOfCode and #pythonlearning
— Durga Pokharel (@mathdurga) February 4, 2021
* More about Regular Expression
* More About basic of Algorithm
* Learned about basic of Numpy#womenintech ,#100DaysofCode, #CodeNewbies ,#womenwhocode, #DEVCommunity pic.twitter.com/Dsadt6KEGv
Top comments (2)
You are now using one of the two libraries that Python is known for - numpy and pandas are part of every data scientist's toolkit. And, as you are a math genius, perhaps you can post a blog article about some uses that you see for it beyond descriptive statistics. :-)
Thank you for the compliment but I am not genius . I am just beginning to learn these things.