Skip to content

Commit 9ad37e7

Browse files
authored
Merge pull request #19 from zoj613/rel-0.2.0
2 parents 945a5b9 + d6ed4d0 commit 9ad37e7

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Package: htnorm
2-
Version: 0.1.1
2+
Version: 0.2.0
33
Title: Fast Simulation of Hyperplane-Truncated Multivariate Normal Distributions
44
Author: Zolisa Bleki
55
Maintainer: Zolisa Bleki <zolisa.bleki@gmail.com>

pyhtnorm/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from ._htnorm import HTNGenerator
22

3-
__version__ = '0.1.1'
3+
__version__ = '0.2.0'

pyhtnorm/_htnorm.pyx

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ cdef class HTNGenerator:
5757
The name of the generator to use for random number generation. The
5858
value needs to be one of {'pcg', 'xrs'}, where 'pcg' is PCG64 and 'xrs'
5959
is the Xoroshiro128plus bit generator.
60-
Methods -------
60+
61+
Methods
62+
-------
6163
hyperplane_truncated_mvnorm(mean, cov, g, r, diag=False, out=False)
6264
structured_precision_mvnorm(mean, a, phi, omega, mean_structured=False,
6365
a_type=0, o_type=0, out=None)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pyhtnorm"
3-
version = "0.1.1"
3+
version = "0.2.0"
44
description = "Fast Simulation of Hyperplane-Truncated Multivatiate Normal Distributions"
55
authors = ["Zolisa Bleki"]
66
license = "BSD-3-Clause"

src/dist.c

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#define std_normal_rand_fill(rng_t, arr_size, arr) \
1313
for (size_t inc = (arr_size); inc--;) (arr)[inc] = std_normal_rand((rng_t))
1414

15-
extern ALWAYS_INLINE(mvn_output_t*) mvn_output_new(size_t nrow, type_t factor_type);
16-
extern ALWAYS_INLINE(void) mvn_output_free(mvn_output_t* a);
1715

1816
// Generate a sample from the standard normal distribution using the Ziggurat method.
1917
// This uses numpy's implementation of the algorithm.

src/dist.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef struct {
3030
/* Get an instance of the `mvn_output_t` struct pointer whose elements have
3131
* dimension `nrow`. The members are allocated memeory on the heap, and thus
3232
* need to free'd using `mvn_output_free` when no longer needed.*/
33-
ALWAYS_INLINE(mvn_output_t*)
33+
static ALWAYS_INLINE(mvn_output_t*)
3434
mvn_output_new(size_t nrow, type_t factor_type)
3535
{
3636
mvn_output_t* out = malloc(sizeof(mvn_output_t));
@@ -50,7 +50,7 @@ mvn_output_new(size_t nrow, type_t factor_type)
5050
}
5151

5252

53-
ALWAYS_INLINE(void)
53+
static ALWAYS_INLINE(void)
5454
mvn_output_free(mvn_output_t* a)
5555
{
5656
free(a->factor);

0 commit comments

Comments
 (0)