2

IPython セッションでは、次のものがあります。

> my_array?
Type:       ndarray
String Form:
[[ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.] <...> [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]
           [ 1.]]
Length: 500

上とは<...> どういう意味ですか? 1D 配列の 1D 配列または何か他のものがありますか?

4

1 に答える 1

3

<...>これは、文字列が長すぎる場合にIPythonが値をスキップする方法です。IPython / core / oinspect.py :

    # String form, but snip if too long in ? form (full in ??)
    if detail_level >= self.str_detail_level:
        try:
            ostr = str(obj)
            str_head = 'string_form'
            if not detail_level and len(ostr)>string_max:
                ostr = ostr[:shalf] + ' <...> ' + ostr[-shalf:]
                ostr = ("\n" + " " * len(str_head.expandtabs())).\
                        join(q.strip() for q in ostr.split("\n"))
            out[str_head] = ostr
        except:
            pass
于 2013-02-01T03:04:23.427 に答える