human
What is a good Python function to transform array to string? What is python function to transform an array to string.
assistant
Here is a Python function to transform array to string

import numpy as np

def _array_to_string(array):
    """ Transform array to string. """
    return '[' + ', '.join([str(x) for x in array]) + ']'

# Enter the array
array = np.array([1, 2, 3])

# Calling the function
print((_array_to_string(array)))

#Example Output
# [1, 2, 3]

#Remember to inspect code for bugs.