-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2a895b
commit a4770d7
Showing
3 changed files
with
45 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import numpy | ||
from nutils import function, mesh | ||
from nutils.testing import TestCase | ||
|
||
class gh_discussion_889(TestCase): | ||
|
||
def test_mul_f64(self): | ||
|
||
domain, geom = mesh.rectilinear([numpy.linspace(0, 1, 2), numpy.linspace(0, 1, 2)]) | ||
|
||
x,y = geom | ||
x = (x*1.02)-0.51 | ||
y = (y*1.02)-0.51 | ||
|
||
domain.trim(-x/2 + y*2.7755575615628914e-17, maxrefine=4) | ||
|
||
def test_div_large_int(self): | ||
|
||
domain, geom = mesh.rectilinear([numpy.linspace(0, 1, 2), numpy.linspace(0, 1, 2)]) | ||
|
||
x,y = geom | ||
x = (x*1.02)-0.51 | ||
y = (y*1.02)-0.51 | ||
|
||
domain.trim(-x/2 + y/36028797018963968, maxrefine=4) | ||
|
||
def test_numpy_array_large_number(self): | ||
numpy.array(36028797018963968, dtype=int) | ||
|
||
def test_array_cast_large_number(self): | ||
function.Array.cast(36028797018963968) | ||
|
||
#domain, geom = mesh.rectilinear([numpy.linspace(0, 1, 2), numpy.linspace(0, 1, 2)]) | ||
|
||
#x,y = geom | ||
#x = (x*1.02)-0.51 | ||
#y = (y*1.02)-0.51 | ||
|
||
#f = y / 36028797018963968 | ||
|
||
#print(domain.sample('gauss', 0)(f).as_evaluable_array.asciitree()) |