<commit_before>#!/usr/bin/env python

##PACKAGES##
import numpy as np
from .._shared.helpers import format_data

def missing_inds(x):
    """
    Returns indices of missing data (i.e. nans)

    This function is useful to identify rows of your array that contain missing
    data or nans.  The returned indices can be used to remove the rows with
    missing data, or label the missing data points that are interpolated
    using PPCA.

    Parameters
    ----------
    x : array or list of arrays


    Returns
    ----------
    x : Numpy array or list of arrays
        This can be either a single array, or a list of arrays

    inds : list, or list of lists
        A list of indices representing rows with missing data. If a list of
        numpy arrays is passed, a list of lists will be returned.

    """

    x = format_data(x)

    inds = [[idx for idx,row in enumerate(arr) if any(np.isnan(row))] for arr in x]

    if len(inds) > 1:<commit_msg>added docstring to missing_inds.py<commit_after>#!/usr/bin/env python

##PACKAGES##
import numpy as np
from .._shared.helpers import format_data

def missing_inds(x):
    """
    Returns indices of missing data (i.e. nans)

    This function is useful to identify rows of your array that contain missing
    data or nans.  The returned indices can be used to remove the rows with
    missing data, or label the missing data points that are interpolated
    using PPCA.

    Parameters
    ----------
    x : array or list of arrays


    Returns
    ----------
    inds : list, or list of lists
        A list of indices representing rows with missing data. If a list of
        numpy arrays is passed, a list of lists will be returned.

    """

    x = format_data(x)

    inds = [[idx for idx,row in enumerate(arr) if any(np.isnan(row))] for arr in x]

    if len(inds) > 1:
{'fraction_non_alphanumeric': 0.08555858310626703, 'fraction_numerical': 0.0010899182561307902, 'mean_word_length': 2.4511278195488724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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}}
{'dir': 'git-commits-cleaned', 'id': '5915240', 'n_tokens_mistral': 545, 'n_tokens_neox': 519, 'n_words': 251}