Skip to content

Commit

Permalink
Fixed a few issues raised by the winbuilder tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pcarbo committed Jan 12, 2024
1 parent 3bc389d commit 18fe41f
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Encoding: UTF-8
Type: Package
Package: fastTopics
Version: 0.6-161
Version: 0.6-162
Date: 2024-01-12
Title: Fast Algorithms for Fitting Topic Models and Non-Negative
Matrix Factorizations to Count Data
Expand Down
2 changes: 1 addition & 1 deletion R/fit_multinom_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fit_multinom_model <- function (cluster, X,
verbose <- match.arg(verbose)

# If necessary, remove all-zero columns from the counts matrix.
if (any.allzero.cols(X)) {
if (any_allzero_cols(X)) {
X <- remove.allzero.cols(X)
warning(sprintf(paste("One or more columns of X are all zero; after",
"removing all-zero columns, %d columns will be",
Expand Down
2 changes: 1 addition & 1 deletion R/fit_poisson_nmf.R
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ fit_poisson_nmf <- function (X, k, fit0, numiter = 100,
method.text <- "CCD"
cat(sprintf("Running %d %s updates, %s extrapolation ",numiter,
method.text,ifelse(control$extrapolate,"with","without")))
cat("(fastTopics 0.6-161).\n")
cat("(fastTopics 0.6-162).\n")
}

# INITIALIZE ESTIMATES
Expand Down
2 changes: 1 addition & 1 deletion R/fit_topic_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ fit_topic_model <-
verbose <- match.arg(verbose)

# If necessary, remove all-zero columns from the counts matrix.
if (any.allzero.cols(X)) {
if (any_allzero_cols(X)) {
X <- remove.allzero.cols(X)
warning(sprintf(paste("One or more columns of X are all zero; after",
"removing all-zero columns, %d columns will be",
Expand Down
2 changes: 1 addition & 1 deletion R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ get.nonzeros <- function (A, j)
# Check if the matrix contains one or more all-zero columns.
#
#' @importFrom Matrix colSums
any.allzero.cols <- function (X)
any_allzero_cols <- function (X)
any(colSums(X > 0) == 0)

# Filter out all-zero columns from the matrix.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# fastTopics

[![R-CMD-check](https://github.com/stephenslab/fastTopics/workflows/R-CMD-check/badge.svg)](https://github.com/stephenslab/fastTopics/actions)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/stephenslab/fastTopics/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/stephenslab/fastTopics/tree/master)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/stephenslab/fastTopics/tree/master.svg?style=svg)](https://app.circleci.com/pipelines/github/stephenslab/fastTopics?branch=master)
[![codecov](https://codecov.io/gh/stephenslab/fastTopics/branch/master/graph/badge.svg)](https://app.codecov.io/gh/stephenslab/fastTopics)

fastTopics is an R package implementing fast, scalable optimization
Expand Down Expand Up @@ -101,7 +101,7 @@ The fastTopics R package was developed by [Peter Carbonetto][peter],
[Matthew Stephens][matthew] and others.

[fasttopics]: https://github.com/stephenslab/fastTopics
[mit-license]: https://opensource.org/licenses/mit-license.html
[mit-license]: https://opensource.org/license/mit/
[issues]: https://github.com/stephenslab/fastTopics/issues
[peter]: https://pcarbo.github.io
[kevin]: https://github.com/kevinlkx
Expand Down
1 change: 0 additions & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CXX_STD = CXX11
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -DARMA_DONT_PRINT_ERRORS \
-DARMA_NO_DEBUG -DARMA_USE_BLAS -DARMA_DONT_USE_OPENMP \
-DARMA_USE_TBB_ALLOC -DRCPP_PARALLEL_USE_TBB=1 \
Expand Down
1 change: 0 additions & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
CXX_STD = CXX11
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) -DARMA_DONT_PRINT_ERRORS \
-DARMA_NO_DEBUG -DARMA_USE_BLAS -DARMA_DONT_USE_OPENMP \
-DARMA_USE_TBB_ALLOC -DRCPP_PARALLEL_USE_TBB=1 \
Expand Down
2 changes: 1 addition & 1 deletion tests/testthat/test_de_analysis.R
Original file line number Diff line number Diff line change
Expand Up @@ -416,5 +416,5 @@ test_that("de_analysis provided with fit and fit$L give the same result",{
de2["ash"] <- NULL
de1["svalue"] <- NULL
de2["svalue"] <- NULL
expect_equal(de1,de2,scale = 1,tolerance = 1e-10)
expect_equal(de1,de2,scale = 1,tolerance = 1e-8)
})

0 comments on commit 18fe41f

Please sign in to comment.