Closed jonathanronen closed 5 years ago
Hi, I have seen this error before, but I will need a bit more details to figure out the problem. (1) Make sure that any old version is uninstalled and restart R after installing the last version. (2) If error persists, could you send me the R script and the MOFA object (before training)? Either by email or via the slack channel.
I'm getting the same error.
The problem occurs at line 112 in BayesNet.py
when drop
contains more than one value (in my case, at least, when both dim["by_r2"]
and dim["by_norm"]
contain something). When removeFactors
is called, this line fails:
if hasattr(self,"covariates"): self.covariates = self.covariates[s.arange(len(self.covariates)) != idx]
If idx
contains more than one value, the comparison evaluates to a single boolean value, which causes self.covariates
to contain a nested array (e.g. [[True, False, True]]
instead of [True, False, True]
. This causes any(self.covariates)
in updates.py
to fail because there's no way to determine how that entire array (i.e. self.covariates[0]
-> [True, False, True]
) should evaluate to a single boolean value.
Pull request incoming.
Dear MOFA maintainers,
I've recently reinstalled R, Python, and MOFA, and suddenly, data that worked before fails with the following error message. Have you seen this before, and do you have any idea as to what's wrong here?
Thanks, J.