File tree Expand file tree Collapse file tree
lib/node_modules/@stdlib/math/base/special/cosm1/test/fixtures/python Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import json
66from math import pi
77import numpy as np
8- from scipy import special
9-
8+ from scipy .special import cosm1
109
1110# Get the file path:
1211FILE = os .path .realpath (__file__ )
@@ -27,10 +26,10 @@ def gen(x, name):
2726
2827 ``` python
2928 python> x = linspace(-1000, 1000, 2001)
30- python> gen(x, \" ./data.json\" )
29+ python> gen(x, ' ./data.json' )
3130 ```
3231 """
33- y = special . cosm1 (x )
32+ y = cosm1 (x )
3433 data = {
3534 "x" : x .tolist (),
3635 "expected" : y .tolist ()
@@ -39,7 +38,8 @@ def gen(x, name):
3938 # Based on the script directory, create an output filepath:
4039 filepath = os .path .join (dir , name )
4140
42- with open (filepath , 'w' ) as outfile :
41+ # Write the data to the output filepath as JSON:
42+ with open (filepath , "w" ) as outfile :
4343 json .dump (data , outfile )
4444
4545
You can’t perform that action at this time.
0 commit comments