<jupyter_start><jupyter_text>Create an ndArray<jupyter_code>data1 = [6, 7.5, 8, 0, 1]
type(data1)
arr1 = np.array(data1)
type(arr1)
  data2 = [[[1]]]
 
arr2 = np.array(data2)
arr2
arr2.ndim<jupyter_output><empty_output><jupyter_text>ZEROS AND ONES<jupyter_code>np.zeros(10)
np.zeros((3, 6))
arr1 = np.array([1, 2, 3], dtype=np.float64)
arr1
arr2 = np.array([1, 2, 3], dtype=np.int32)
arr2<jupyter_output><empty_output><jupyter_text>CONVERTING DTYPE<jupyter_code>arr = np.array([1, 2, 3, 4, 5])
arr.dtype
float_arr = arr.astype(np.float64)
float_arr.dtype<jupyter_output><empty_output><jupyter_text>Arithmetic<jupyter_code>x = np.array([[1., 2., 3.], [4., 5., 6.]])
x<jupyter_output><empty_output><jupyter_text>Indexing and Slicing<jupyter_code>arr = np.arange(10)
arr[5]


slice_arr = arr[5:8]
arr[5:8] = 12<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1827956989247312, 'fraction_numerical': 0.06810035842293907, 'mean_word_length': 7.38, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '271511', 'license': 'MIT', 'n_tokens_mistral': 429, 'n_tokens_neox': 403, 'n_words': 59, 'path': 'Numpy_1 (1).ipynb', 'repo_name': 'mak8888/Pyhton-practice', 'size': '837'}