jupyter ipywidgets не показывает возвращаемое значение функции - PullRequest
0 голосов
/ 18 октября 2019

Я использовал самый простой пример:

from ipywidgets import interact, widgets
from IPython.display import display


# this is a sample function
def myfunc(x):
    display(x*2) # I add this for testing
    print(x*2)  # I add this for testing
    return x*2

interact(myfunc,x=widgets.IntSlider(min=-10,max=10,value=0))

во время ползунка, без вывода.

enter image description here

Но тот же примерв здесь показывает вывод: enter image description here

Как мне исправить юпитер, чтобы показать вывод?

1 Ответ

0 голосов
/ 19 октября 2019

Просто найдите, что это было вызвано Limit Output extension

image

Параметры:

image

Хотя номер предельного числа: 100000, по-прежнему влияет на ipywidgets.

Отключить эту работу:

image

...