Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix ssd demo #4890

Merged
merged 2 commits into from
Feb 7, 2017
Merged

fix ssd demo #4890

merged 2 commits into from
Feb 7, 2017

Conversation

howard0su
Copy link
Contributor

No description provided.

@piiswrong
Copy link
Contributor

Why? These were added to fix bugs

@howard0su
Copy link
Contributor Author

because 571b9a4 breaks this

@piiswrong
Copy link
Contributor

Is it due to this:


def array(source_array, ctx=None, dtype=mx_real_t):
    """Create a new NDArray that copies content from source_array.

    Parameters
    ----------
    source_array : array_like
        Source data to create NDArray from.

    ctx : Context, optional
        The context of the NDArray, default to current default context.

    Returns
    -------
    out: Array
        The created NDArray.
    """

    if not isinstance(source_array, np.ndarray):

?
If yes we should change isinstance(source_array, np.ndarray): to isinstance(source_array, (np.ndarray, NDArray)):

@howard0su
Copy link
Contributor Author

No. I think the only place which needs mean_pixel is in iterator.py. So it should allow to pass in any array like things like array or tuple. and convert it to ndarray in iterator.py. I am not sure what's intention of original fix to convert to ndarray in higher level of code. However it doesn't make sense to me.

@piiswrong piiswrong merged commit 2f222cf into apache:master Feb 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants