<jupyter_start><jupyter_text>revel and flattend array<jupyter_code>import numpy as np
q=np.linspace(1,5,6)
q
q.ravel()
x=np.arange(9).reshape(3,3)
x
ravelled_array=x.ravel()
ravelled_array[2]=100
print(ravelled_array)
print(x)
y=np.arange(9).reshape(3,3)
flattend_array=y.flatten()
ravelled_array[2]=100
print(flattend_array)
print(y)
import numpy as np

z=np.arange(9).reshape(3,3)

z
z=np.arange(9)
z
z.shape(2,3)
u=np.array([[1,2],[3,4]])
v=np.array([[5,6],[7,8]])
print(u+v)
u-v
u/v
import os
np.save('x_array',x)
np.fromfunction(lambda i,j:i==j,(3,3),dtype=int)
np.fromfunction(lambda i,j:i+j,(3,3),dtype=int)
iterable=(x*x for x in range(5))
iterable
np.fromstring('1 2',dtype=int,sep=' ')
###new<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21174863387978143, 'fraction_numerical': 0.05191256830601093, 'mean_word_length': 8.905405405405405, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '354695', 'license': 'MIT', 'n_tokens_mistral': 370, 'n_tokens_neox': 365, 'n_words': 51, 'path': 'Data-Science-HYD-2k19/Extra/numpy class3.ipynb', 'repo_name': 'Sanjay9921/Python', 'size': '732'}