title: How to pass an array as an argument to javascript function calling from python using js2py?
body: <p>I have written some really long functions in javascript already, and now I want to utilise and can't write them again in python, but the data I'm receiving is from python code.
  So I'm translating the javascript code into python using js2py.translate_file.
  The data is in a matrix format, so after translating the js file, while I make a call to a function how do I pass the matrix from py file and how do I receive it in the js function?</p>
  <p>I know it will be easy to just write the function in py file instead, but I had already written it in js and now I'm desperate to use it from js file, Please help me get this...</p>
  <p>This is the code in the py file.</p>
  <pre class="lang-py prettyprint-override"><code>import js2py
  
  js2py.translate_file(&quot;j_script.js&quot;, &quot;my4.py&quot;)
  from my4 import *
  my4.get_data(mat)
  </code></pre>
  <p>This is the function in the js file that will receive the data.</p>
  <pre class="lang-js prettyprint-override"><code>function get_data(grid_wise){
      
      for(var bi=0; bi&lt;9; bi++){
          for(var ni=0; ni&lt;9; ni++){
              new_new_matrix[bi][ni]=grid_wise[bi][ni];  
          }
      }
      for(var bi=0; bi&lt;9; bi++){
          for(var ni=0; ni&lt;9; ni++){
              reassign(bi, ni);
          }
      }
      console.log(mat_row_wise);
  }
  </code></pre>