Package: mds-array-manipulation
mds_array_manipulationSummaryProject SummaryThe package is intended to do basic array manipulations functions like Searching, Sorting, Counting non-zero elements, Finding indices of max value.
This is a package developed for the group-17 project for the UBC MDS DSCI 524 (Collaborative Software Development) course. Documentation can be foundhere.The package has been published on the pypi website and you can find ithere.Functions Included in the Packagesort_array: Takes a numpy array of integers or strings and returns the array in sorted order, using Insertion Sort (Sedgewick, 1983).search_array: Searches for and returns the index of a specified element in a numpy array, if it existscount_nonzero_elements: Count the number of non zero elements in an arrayargmax: Returns the index of the max element in the arrayFit into the Python EcosystemThere are several Python packages focused on array manipulation, such as numpy, which have extensive features. This package aims to recreate some of the basic array operations available in thenumpy package(Numpy Developers, 2008-2024) for use in Data Science preprocessing workflows. The package is intended to focus only on the basic operations to make Data science worflows easier to understand and use for beginner programmers.InstallationInstallation can be done from pypi using the following commandpipinstallmds_array_manipulationInstallation from sourceClone the github repository using:gitclonehttps://github.com/UBC-MDS/mds_array_manipulation.gitChange to the project root directorycd mds_array_manipulationYou can installmds_array_manipulationpackage usingpoetrypoetry installIf you dont have poetry installed in your base environment, you can follow theinstallation guidefor poetry.FeaturesContains functions: Searching, Sorting, Counting non-zero elements, Finding indices of max value. This package is a group-17 project for the UBC MDS DSCI 524 (Collaborative Software Development) course.DependenciesPython 3 or greaterUsageA full vignette can be found on the documentation sitehereExample usage:>>>importnumpyasnp
>>>frommds_array_manipulation.search_arrayimportsearch_array
>>>frommds_array_manipulation.argmaximportargmax
>>>frommds_array_manipulation.sort_arrayimportsort_array
>>>frommds_array_manipulation.count_nonzero_elementsimportcount_nonzero_elements

>>>arr=np.array([20,10,40,30,50,90,60])>>>search_array(arr,50)4>>>argmax(arr)5>>>sort_array(arr)array([10,20,30,40,50,60,90])>>>count_nonzero_elements(arr)7Running Unit TestsExecute the following in the project root directory after the package has been installed:poetry run pytestTo get the coverage report, run the following code:poetry run pytest tests/ --cov=src/mds_array_manipulation/ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.ContributorsSean McKay - @sean-m-mckayKittipong Wongwipasamitkun (Jo) - @jokittipongYan Zeng - @Owl64901Aishwarya Nadimpally - @Aishwarya120111Licensemds_array_manipulationwas created by Kittipong Wongwipasamitkun, Sean Mckay, Yan Zeng, Aishwarya Nadimpally. It is licensed under the terms of the MIT license for software code part including source code examples in the documentation and it is licensed under the terms of the Attribution-ShareAlike 4.0 International, for Parts Other than the Software Code (Package Documentation, Data, Text, and any Media). SeeLICENSE.Creditsmds_array_manipulationwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.ReferencesSedgewick, Robert (1983). Algorithms. Addison-Wesley. p. 95. ISBN 978-0-201-06672-2.NumPy Developers (2008-2024). NumPy documentation. Version: 2.0.dev0