File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,17 @@ define([], function() {
9090 ' except ValueError:' ,
9191 ' return 0.0'
9292 ]
93- }
93+ } ,
94+ 'vpimport' : [
95+ { library : 'numpy' , alias :'np' } ,
96+ { library : 'pandas' , alias :'pd' } ,
97+ { library : 'matplotlib.pyplot' , alias :'plt' ,
98+ include : [
99+ '%matplotlib inline'
100+ ]
101+ } ,
102+ { library : 'seaborn' , alias :'sns' }
103+ ]
94104 }
95105
96106 this . data = {
@@ -165,7 +175,8 @@ define([], function() {
165175 Jupyter . notebook . config . loaded . then ( function ( ) {
166176 var data = Jupyter . notebook . config . data [ configKey ] ;
167177 if ( data == undefined ) {
168- data = { } ;
178+ reject ( 'No data available.' ) ;
179+ return ;
169180 }
170181 if ( dataKey == '' ) {
171182 resolve ( data ) ;
@@ -184,7 +195,7 @@ define([], function() {
184195 Jupyter . notebook . config . load ( ) ;
185196 var data = Jupyter . notebook . config . data [ configKey ] ;
186197 if ( data == undefined ) {
187- data = { } ;
198+ return undefined ;
188199 }
189200 if ( dataKey == '' ) {
190201 return data ;
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ define([
8181 page . appendLine ( '</tr></thead>' ) ;
8282 page . appendLine ( '<tbody>' ) ;
8383 let that = this ;
84- this . state . importMeta . forEach ( ( lib , idx ) => {
84+ this . state . importMeta && this . state . importMeta . forEach ( ( lib , idx ) => {
8585 page . appendLine ( that . templateForLibrary ( idx , lib . library , lib . alias ) ) ;
8686 } ) ;
8787 page . appendLine ( '</tbody>' ) ;
You can’t perform that action at this time.
0 commit comments