Skip to content

Commit

Permalink
imports required for censored distribution code
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwesley committed Nov 25, 2024
1 parent de290ec commit c4dfd6c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,12 @@ jobs:
if: steps.r-package-cache.outputs.cache-hit != 'true'
run: install.packages("remotes")

# Install Homebrew and qpdf on macOS
- name: Install Homebrew and qpdf
if: runner.os == 'macOS'
run: |
# Install Homebrew if not already installed
if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
else
echo "Homebrew already installed."
fi
# Ensure Homebrew is updated
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
# Install qpdf
brew install qpdf
brew install qpdf || echo "qpdf already installed."
- name: Install system dependencies
if: runner.os == 'Linux'
Expand Down
13 changes: 13 additions & 0 deletions R/censored.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
distrib <- .internals$nodes$constructors$distrib
distribution_node <- .internals$nodes$node_classes$distribution_node
as.greta_array <- .internals$greta_arrays$as.greta_array

check_dims <- .internals$checks$check_dims
check_numeric_length_1 <- .internals$checks$check_numeric_length_1
check_finite <- .internals$checks$check_finite
check_x_gte_y <- .internals$checks$check_x_gte_y
check_param_greta_array <- .internals$checks$check_param_greta_array

tfp <- import("tensorflow_probability")
tf <- import("tensorflow")

normal_censored_distribution <- R6::R6Class(
"normal_censored_distribution",
inherit = distribution_node,
Expand Down

0 comments on commit c4dfd6c

Please sign in to comment.