Permalink
Browse files

* doc/source/archive.rst, func.py, tests/io_test.py, sandbox/bench.py:

      Use new rand and randn function.
  • Loading branch information...
1 parent 12c28d8 commit c8be5a24f5e9e8794dae5f50bcd4d9166340479c @kwgoodman committed Jun 5, 2010
Showing with 9 additions and 6 deletions.
  1. +3 −0 ChangeLog
  2. +2 −2 doc/source/archive.rst
  3. +1 −1 la/func.py
  4. +2 −1 la/tests/io_test.py
  5. +1 −2 sandbox/bench.py
View
@@ -1,5 +1,8 @@
2010-06-05 Keith
+ * doc/source/archive.rst, func.py, tests/io_test.py, sandbox/bench.py:
+ Use new rand and randn function.
+
* func.py(rand), func.py(randn), doc/source/functions.rst, RELEASE,
__init__.py, doc/source/work.rst: Added functions rand and randn both of
which return larrys.
View
@@ -205,8 +205,8 @@ and delete the old archive.
Before looking at the size of the archive, let's add some bigger larrys:
::
>>> import numpy as np
- >>> io['rand'] = la.larry(np.random.rand(1000, 1000))
- >>> io['randn'] = la.larry(np.random.rand(1000, 1000))
+ >>> io['rand'] = la.rand(1000, 1000)
+ >>> io['randn'] = la.randn(1000, 1000)
>>> io
larry dtype shape
----------------------------
View
@@ -322,7 +322,7 @@ def rand(*args, **kwargs):
A shape (2, 2) random larry:
- >>> la.rand(2,2)
+ >>> la.rand(2, 2)
label_0
0
1
View
@@ -8,6 +8,7 @@
import numpy as np
nan = np.nan
+import la
from la import larry
from la import (IO, archive_directory)
from la.util.testing import assert_larry_equal
@@ -39,7 +40,7 @@ def test_io_1(self):
def test_io_2(self):
"io_repack"
io = IO(self.filename)
- io['larry'] = larry(np.random.rand(100,100))
+ io['larry'] = la.rand(100, 100)
fs1 = io.freespace
sp1 = io.space
del io['larry']
View
@@ -24,8 +24,7 @@ def bench(verbose=True):
return la.larry.fromtuples(results)
def fx(shape):
- x = np.random.randn(*shape)
- lar = la.larry(x)
+ lar = la.randn(*shape)
lar.shufflelabel()
return lar

0 comments on commit c8be5a2

Please sign in to comment.