<jupyter_start><jupyter_text>ndarray<jupyter_code>array = np.arange(15)
shape = array.reshape(3, 5)
shape<jupyter_output><empty_output><jupyter_text>ndarray.shape: the dimension of the array<jupyter_code>shape.shape<jupyter_output><empty_output><jupyter_text>ndarray.ndim: the number of axes (dimensions) of the array<jupyter_code>shape.ndim<jupyter_output><empty_output><jupyter_text>Array Creation<jupyter_code>np.array([2,3,4])
np.array([(1.5,2,3), (4,5,6)])
np.zeros( (3,4) )
np.ones( (2,3,4), dtype=np.int16 )
np.arange( 10, 30, 5 ) # a sequence of number: start, end, step
np.arange( 0, 2, 0.3 ) # float
np.linspace( 0, 2, 9 ) # 9 numbers from 0 to 2<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1618075801749271, 'fraction_numerical': 0.052478134110787174, 'mean_word_length': 7.69620253164557, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '308842', 'license': 'MIT', 'n_tokens_mistral': 318, 'n_tokens_neox': 299, 'n_words': 53, 'path': 'exercises/numpy - ndarray.ipynb', 'repo_name': 'ljinke/MachineLearning', 'size': '686'}