Giter Club home page Giter Club logo

Comments (6)

rappdw avatar rappdw commented on June 29, 2024 5

I was able to work around this by doing the following:

  1. in setup.py change the Extension name to be fully qualified, e.g. name=tsne.bh_sne
  2. in tsne/init.py fully qualify the bh_sne(_3d) imports, e.g. from tsne.bh_sne import BH_SNE

from tsne.

mohitkaushikj133 avatar mohitkaushikj133 commented on June 29, 2024 1

I am using python 3.6 on mac and getting error

File "tsne/bh_sne.pyx", line 12, in init tsne.bh_sne
AttributeError: type object 'tsne.bh_sne.BH_SNE' has no attribute 'reduce_cython'

from tsne.

mzwiessele avatar mzwiessele commented on June 29, 2024

Same encounter the same error, but commenting the line does not fix the problem. If I comment the line and recompile, it imports fine. But when running bh_sne, it complains about 'np' not being defined...:


----> tsne.bh_sne(np.random.normal(0,1,(40,20)))
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-5-2cbae1ab71c4> in <module>()
----> 1 tsne.bh_sne(np.random.normal(0,1,(40,20)))

/home/maxz/Documents/tsne/tsne/__init__.py in bh_sne(data, pca_d, d, perplexity, theta, random_state, copy_data)
     57 
     58     tsne = BH_SNE()
---> 59     Y = tsne.run(X, N, X.shape[1], d, perplexity, theta, seed)
     60     return Y
     61 

/home/maxz/Documents/tsne/tsne/bh_sne.pyx in tsne.bh_sne.BH_SNE.run (tsne/bh_sne.cpp:1571)()

NameError: name 'np' is not defined
> /home/maxz/Documents/tsne/bh_sne.pyx(24)tsne.bh_sne.BH_SNE.run (tsne/bh_sne.cpp:1571)()

I am running python 3.5 on linux, using anaconda python.

from tsne.

bourbe avatar bourbe commented on June 29, 2024

Same Problem for me. I was not able to run this on 3.5

from tsne.

mdinesh9 avatar mdinesh9 commented on June 29, 2024

@rappdw +1

To add:
After installation use the below line to import:

import tsne.bh_sne as bh_sne

from tsne.

tranhungnghiep avatar tranhungnghiep commented on June 29, 2024

@mohitkaushikj133 #29

from tsne.

Related Issues (20)

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.