Skip to content

Commit

Permalink
Patch Torch import error
Browse files Browse the repository at this point in the history
Removed some lingering Torch code that prevented PyPWA from importing
due to missing packages when running without Torch. While I was in there
I also removed the extra unused imports.
  • Loading branch information
markjonestx committed May 7, 2023
1 parent 9fb55cb commit 29987a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion PyPWA/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
__credits__ = ["Mark Jones"]

AUTHOR = "PyPWA Team and Contributors"
VERSION = "4.0.0"
VERSION = "4.0.1"
RELEASE = f"{VERSION}"
LICENSE = "GPLv3"
STATUS = "production"
8 changes: 1 addition & 7 deletions PyPWA/libs/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@
"""

import multiprocessing
from typing import Any, Dict, List, Union, Set, Tuple
from typing import Any, Dict, List, Union, Tuple

import numpy as np
import numpy as npy
import pandas as pd
import torch.cuda

from PyPWA import info as _info
from PyPWA.libs import process
from PyPWA.libs.fit import likelihoods

try:
import cupy as cp
except ImportError:
cp = npy


__credits__ = ["Mark Jones"]
__author__ = _info.AUTHOR
Expand Down
3 changes: 1 addition & 2 deletions PyPWA/libs/vectors/_base_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
usable, and the base object for math that is similar for all vector types.
"""

from typing import Union, Tuple
from abc import abstractmethod
from typing import Union

import numpy as np
import pandas as pd
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

__author__ = "PyPWA Team and Contributors"
__license__ = "GPLv3"
__version__ = "4.0.0"
__version__ = "4.0.1"
__email__ = "salgado@jlab.org"
__status__ = "Production"

Expand Down

0 comments on commit 29987a0

Please sign in to comment.