human
impute missing values in 2d array.
assistant
Here is a Python code to impute missing values in 2d arrays

import numpy as np

def impute_missing_values(array):
    """
    >>> array = np.array([[1,2,3],[4,5,6],[7,8,9]])
    >>> impute_missing_values(array)
    array([[1, 2, 3],
           [4, 5, 6],
           [7, 8, 9]])
    """
    array = np.array(array)
    array[np.isnan(array)] = 0
    return array

# Enter the 2d array
array = np.array([[1,2,3],[4,5,6],[7,8,9]])

# Calling the function
array = impute_missing_values(array)

# Print the array

#Remember to inspect code for bugs.