1 from . import (np, assert_allclose, contract, MatrixLinearSpace)
5 '''
6 This is the usual Euclidean space of finite dimension;
7 this is mostly used for debugging.
8
9 There is no proper Haar measure; as an arbitrary choice,
10 the :py:func:`sample_uniform`
11 returns a sample from a Gaussian distribution centered at 0.
12
13 '''
14
18
20 return 'R%s' % (self.dimension)
21
22 @contract(x='array')
24 assert_allclose(x.size, self.dimension)
25 assert np.all(np.isreal(x)), "Expected real vector"
26
29
31 points = []
32 points.append(np.zeros(self.dimension))
33 points.append(np.ones(self.dimension))
34 return points
35
37 return x
38