alok-ai-lab / pyDeepInsight

A python implementation of the DeepInsight methodology.
GNU General Public License v3.0
158 stars 47 forks source link

Fail to import ImageTransformer #39

Closed shibataryohei closed 6 months ago

shibataryohei commented 6 months ago

Hi,

Recently I've got an error when I import ImageTransformer from pyDeepInsight as below. Do you have any solution? I ran this code in Google Colab.

!python3 -m pip -q install git+https://github.com/alok-ai-lab/pyDeepInsight.git#egg=pyDeepInsight
from pyDeepInsight import ImageTransformer

Traceback (most recent call last):

  File "/usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  File ["<ipython-input-12-a2722f987c84>"](https://localhost:8080/#), line 3, in <cell line: 3>
    from pyDeepInsight import ImageTransformer

  File "/content/pyDeepInsight/pyDeepInsight/__init__.py", line 1, in <module>
    from .image_transformer import ImageTransformer

  File "/content/pyDeepInsight/pyDeepInsight/image_transformer.py", line 350
    img_matrix[:, *c] = X[:, np.where(idx == i)[0]].mean(axis=1)
                  ^
SyntaxError: invalid syntax

Thank you, Ryohei

faberrocalv commented 6 months ago

Hi! I have the same issue both in colab or after installing it in my pc with the installation command.

kaboroevich commented 6 months ago

Thanks for the report. This appears to be a syntax only valid in python 3.11. A fix is in progress.