hikari.utility.numpy_tools ========================== .. py:module:: hikari.utility.numpy_tools .. autoapi-nested-parse:: This file contains basic tools to work with numpy objects used in the package. Functions --------- .. autoapisummary:: hikari.utility.numpy_tools.str2array Module Contents --------------- .. py:function:: str2array(s) Create a numpy int8 array using its compact representation saved as string. The input string might contain only digits and special characters. Every individual digit is treated as a new element, while the special characters induce special behaviour and include: - slash `/` - if present, divides main list into multiple sub-lists; - hyphen `-` - the next digit will be read as negative Please mind that the compact form used as this function's input is unfit to store floating point numbers or integers with absolute value above 9. :param s: input string containing only digits and special characters :return: a two-dimensional numpy array with integers