diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 56388979d..44694d12a 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -127,7 +127,7 @@ jobs: uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 if: ${{ ! matrix.standalone }} with: - key: cython-extensions-${{ matrix.os.image }}-${{ matrix.python-version }}-32bit-${{ matrix.float_dtype_32 }} + key: cython-extensions-${{ matrix.os.image }}-${{ runner.arch }}-${{ matrix.python-version }}-32bit-${{ matrix.float_dtype_32 }} path: ${{ steps.cython-cache.outputs.cachedir }} - name: Run Tests diff --git a/brian2/codegen/generators/GSL_generator.py b/brian2/codegen/generators/GSL_generator.py index cd9ea2c01..3f7d8d652 100644 --- a/brian2/codegen/generators/GSL_generator.py +++ b/brian2/codegen/generators/GSL_generator.py @@ -1079,20 +1079,13 @@ def unpack_namespace_single(self, var_obj, in_vector, in_scalar): code = [] if isinstance(var_obj, ArrayVariable): array_name = self.generator.get_array_name(var_obj) - dtype = self.c_data_type(var_obj.dtype) if in_vector: - code += [ - f"_GSL_dataholder.{array_name} = <{dtype} *> _buf_{array_name}.data" - ] - if in_scalar: - code += [f"{array_name} = <{dtype} *> _buf_{array_name}.data"] + code += [f"_GSL_dataholder.{array_name} = {array_name}"] else: if in_vector: code += [ f'_GSL_dataholder.{var_obj.name} = _namespace["{var_obj.name}"]' ] - if in_scalar: - code += [f'{var_obj.name} = _namespace["{var_obj.name}"]'] return "\n".join(code) @staticmethod diff --git a/brian2/codegen/generators/cython_generator.py b/brian2/codegen/generators/cython_generator.py index baf6000b3..b66f26061 100644 --- a/brian2/codegen/generators/cython_generator.py +++ b/brian2/codegen/generators/cython_generator.py @@ -440,7 +440,7 @@ def determine_keywords(self): " _buf_{array_name} = _namespace['{array_name}']" ), ( - "cdef {cpp_dtype} * {array_name} = <{cpp_dtype} *>" + "cdef char* {array_name} = " " _buf_{array_name}.data" ), ]