arrayfire / arrayfire/arrayfire-python

import changes directory

Aberta
#147 8 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
422
Forks
63
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Importing the arrayfire module changes the working directory. For example:

```
$ python
Python 2.7.13 (default, Apr 4 2017, 08:46:44)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print os.getcwd()
/private/tmp
>>> import arrayfire as af
>>> print os.getcwd()
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Resources
>>> print af.get_version()
(3, 3, 2)
```

This causes problems with any file names specified with a relative path.

I'm running on OS X 10.11 with arrayfire 3.3.2 installed with homebrew and arrayfire-python installed with pip.

I don't see any `chdir` calls in the module, so I'm not sure where the problem is.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

Start by reproducing the import in the Python 2.7 macOS environment described in the issue, then trace the arrayfire import and its native initialization to find what changes the working directory. Done means importing arrayfire leaves the current directory unchanged and relative file paths continue to work.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
api
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
30/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.