File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3636__all__ = ["OWPythonScript" ]
3737
3838
39+ DEFAULT_SCRIPT = """import numpy as np
40+ from Orange.data import Table, Domain, ContinuousVariable
41+
42+ arr = np.random.rand(3,3)
43+ domain = Domain([ContinuousVariable(i) for i in ['one', 'two', 'three']])
44+ out_data = Table.from_numpy(domain, arr)
45+ """
46+
3947def text_format (foreground = Qt .black , weight = QFont .Normal ):
4048 fmt = QTextCharFormat ()
4149 fmt .setForeground (QBrush (foreground ))
@@ -423,8 +431,8 @@ class Outputs:
423431
424432 settings_version = 2
425433 scriptLibrary : 'List[_ScriptData]' = Setting ([{
426- "name" : "Hello world " ,
427- "script" : "print('Hello world') \n " ,
434+ "name" : "from_numpy " ,
435+ "script" : DEFAULT_SCRIPT ,
428436 "filename" : None
429437 }])
430438 currentScriptIndex = Setting (0 )
You can’t perform that action at this time.
0 commit comments