<jupyter_start><jupyter_text>Numpy Basics<jupyter_code># import NumPy library to use it
import numpy as np

# create a simple numpy array
a = np.array([1,2,3]) 

print(a)
# create two dimension array
a = np.array([[1, 2], [3, 4]])

print(a)
# minimum dimension
a = np.array([1, 2, 3,4,5], ndmin = 2)

print(a)
# element data type
a = np.array([1, 2, 3], dtype = complex)

print(a)
# data types
dt = np.dtype(np.int32)

print(dt)<jupyter_output>int32
{'fraction_non_alphanumeric': 0.1603563474387528, 'fraction_numerical': 0.044543429844097995, 'mean_word_length': 4.69620253164557, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '620375', 'license': 'Apache-2.0', 'n_tokens_mistral': 199, 'n_tokens_neox': 189, 'n_words': 54, 'path': 'basics.ipynb', 'repo_name': 'MaiaNgo/numpy-basics', 'size': '449'}