Giter Club home page Giter Club logo

butchr's People

Contributors

andquintero avatar wurst-theke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

butchr's Issues

'module' object is not subscriptable

Hi,

I am running the sample code. However, a error was thrown as "Error in py_get_item_impl(x, key, FALSE) : TypeError: 'module' object is not subscriptable". Would you please suggest how to get this fixed? Thanks.

Li

TypeError: 'module' object is not subscriptable

Hi dears,

I'm trying to run your example data as specified in the installation guide but I always get the following error after calling the run_NMF_tensor() function. Any idea how to fix it? I tried to research it online but I couldn't find anything.

library(tensorflow)
library(BiocStyle)
library(ButchR)
library(knitr)
library(ComplexHeatmap)
library(viridis)
library(tidyverse)

data(leukemia)

k_min <- 2
k_max <- 4

leukemia_nmf_exp <- run_NMF_tensor(X = leukemia$matrix, 
                                   ranks = k_min:k_max, 
                                   method = "NMF", 
                                   n_initializations = 10,  
                                   extract_features = TRUE)

Error in py_get_item_impl(x, key, FALSE) :
TypeError: 'module' object is not subscriptable

sessionInfo()

R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

traceback()

8: stop(structure(list(message = "TypeError: 'module' object is not subscriptable",
call = py_get_item_impl(x, key, FALSE), cppstack = structure(list(
file = "", line = -1L, stack = c("1 reticulate.so 0x000000010b2ad05e _ZN4Rcpp9exceptionC2EPKcb + 222",
"2 reticulate.so 0x000000010b2b56a5 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53",
"3 reticulate.so 0x000000010b2c2d00 _ZN12_GLOBAL__N_113py_get_commonEPN9libpython7_objectEbb + 160",
"4 reticulate.so 0x000000010b2c2f21 _Z16py_get_item_impl11PyObjectRefN4Rcpp12RObject_ImplINS0_15PreserveStorageEEEb + 177",
"5 reticulate.so 0x000000010b2a0593 _reticulate_py_get_item_impl + 131",
"6 libR.dylib 0x0000000109e3bf52 R_doDotCall + 1458",
"7 libR.dylib 0x0000000109e870ed bcEval + 104317",
"8 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"9 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"10 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"11 libR.dylib 0x0000000109e7420e bcEval + 26782",
"12 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"13 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"14 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"15 libR.dylib 0x0000000109e7420e bcEval + 26782",
"16 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"17 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"18 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"19 libR.dylib 0x0000000109e7420e bcEval + 26782",
"20 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"21 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"22 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"23 libR.dylib 0x0000000109ed7137 dispatchMethod + 775",
"24 libR.dylib 0x0000000109ed6d03 Rf_usemethod + 483",
"25 libR.dylib 0x0000000109e971f6 tryDispatch + 374",
"26 libR.dylib 0x0000000109e8560b bcEval + 97435",
"27 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"28 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"29 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"30 libR.dylib 0x0000000109e7420e bcEval + 26782",
"31 libR.dylib 0x0000000109e6d2c1 Rf_eval + 385",
"32 libR.dylib 0x0000000109e8d139 R_execClosure + 2169",
"33 libR.dylib 0x0000000109e8bf27 Rf_applyClosure + 471",
"34 libR.dylib 0x0000000109e6d77b Rf_eval + 1595",
"35 libR.dylib 0x0000000109e90806 do_set + 2534",
"36 libR.dylib 0x0000000109e6d4b7 Rf_eval + 887",
"37 libR.dylib 0x0000000109ec28a7 Rf_ReplIteration + 807",
"38 libR.dylib 0x0000000109ec3ef1 R_ReplConsole + 161",
"39 libR.dylib 0x0000000109ec3e42 run_Rmainloop + 82",
"40 libR.dylib 0x0000000109ec3f7e Rf_mainloop + 14",
"41 rsession 0x0000000109975170 _ZN13rstudio_boost4asio6detail24descriptor_write_op_baseINS0_15const_buffers_1EE10do_performEPNS1_10reactor_opE + 691568",
"42 rsession 0x00000001099483f4 _ZN13rstudio_boost4asio6detail24descriptor_write_op_baseINS0_15const_buffers_1EE10do_performEPNS1_10reactor_opE + 507892",
"43 rsession 0x00000001090de8bb _ZN13rstudio_boost4asio6detail30reactive_socket_accept_op_baseINS0_12basic_socketINS0_2ip3tcpEEES5_E10do_performEPNS1_10reactor_opE + 562571",
"44 libdyld.dylib 0x00007fff20402f5d start + 1"
)), class = "Rcpp_stack_trace")), class = c("Rcpp::exception",
"C++Error", "error", "condition")))
7: py_get_item_impl(x, key, FALSE)
6: py_get_item(x, name)
5: py_get_attr_or_item(x, name, FALSE)
4: [[.python.builtin.object(tensorTheCleaver, module[1])
3: tensorTheCleaver[[module[1]]]
2: source_NMFtensor_function(method)
1: run_NMF_tensor(X = leukemia$matrix, ranks = k_min:k_max, method = "NMF",
n_initializations = 10, extract_features = TRUE)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.