Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!-- Name: Changelog -->
#Changelog

Updated to be compatible with python3.12 and beyond, and scipy 1.x.
Original changelog:

Version 0.18 represents the culmination of almost two months of efforts, yet
another step in the current time-based release scheme.

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<img src="https://rawgithub.com/ahkab/ahkab/master/doc/images/logo_small.png" alt="Monkeying around" style="width: 80px;"/> ahkab
=================================================================================================================================
Updated to be compatible with python3.12 and beyond, and scipy 1.x.
Original description:
=================================================================================================================================

**a SPICE-like electronic circuit simulator written in Python**

Expand Down
2 changes: 1 addition & 1 deletion ahkab/fourier.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import numpy.fft as fft

from scipy.interpolate import InterpolatedUnivariateSpline
from scipy.signal import (bartlett, hann, hamming, blackman,
from scipy.signal.windows import (bartlett, hann, hamming, blackman,
blackmanharris, gaussian, kaiser)

from . import options
Expand Down
6 changes: 3 additions & 3 deletions ahkab/netlist_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
division, print_function)

import sys
import imp
import importlib
import math
import copy
import os
Expand Down Expand Up @@ -1140,8 +1140,8 @@ def parse_elem_user_defined(line, circ):
module = circuit.user_defined_modules_dict[module_name]
else:
try:
fp, pathname, description = imp.find_module(module_name)
module = imp.load_module(module_name, fp, pathname, description)
fp, pathname, description = importlib.find_module(module_name)
module = importlib.load_module(module_name, fp, pathname, description)
except ImportError:
raise NetlistParseError("module " + module_name + " not found.")
circuit.user_defined_modules_dict.update({module_name: module})
Expand Down
6 changes: 3 additions & 3 deletions ahkab/transient.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
division, print_function)

import sys
import imp
import importlib

import numpy as np

Expand Down Expand Up @@ -648,7 +648,7 @@ def get_as_matrix(self):
return complete_matrix

def import_custom_df_module(method, print_out):
"""Imports a module that implements differentiation formula through imp.load_module
"""Imports a module that implements differentiation formula through importlib.load_module
Parameters:
method: a string, the name of the df method module
print_out: print to stdout some verbose messages
Expand All @@ -657,7 +657,7 @@ def import_custom_df_module(method, print_out):
The df module or None if the module is not found.
"""
try:
df = imp.load_module(imp.find_module(method.lower()))
df = importlib.load_module(importlib.find_module(method.lower()))
if print_out:
print("Custom df module "+method.lower()+" loaded.")
except:
Expand Down
2 changes: 2 additions & 0 deletions pypi_description.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ahkab
=====
Updated to be compatible with python3.12 and beyond, and scipy 1.x
=====

**a SPICE-like electronic circuit simulator written in Python**

Expand Down