diff --git a/.gitignore b/.gitignore index 9d88ee1..3d50865 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ # Temporary Items *.tmp *.tmp.* +temp # Virtual Environments /venv*/ diff --git a/PythonKit/NumpyConversion.swift b/PythonKit/NumpyConversion.swift index c802694..e0c81a2 100644 --- a/PythonKit/NumpyConversion.swift +++ b/PythonKit/NumpyConversion.swift @@ -137,7 +137,7 @@ where Element : NumpyScalarCompatible { self.init(repeating: dummyPointer.move(), count: scalarCount) dummyPointer.deallocate() withUnsafeMutableBufferPointer { buffPtr in - buffPtr.baseAddress!.assign(from: ptr, count: scalarCount) + buffPtr.baseAddress!.update(from: ptr, count: scalarCount) } } } diff --git a/Tests/PythonKitTests/PythonFunctionTests.swift b/Tests/PythonKitTests/PythonFunctionTests.swift index db39d06..f11ad57 100644 --- a/Tests/PythonKitTests/PythonFunctionTests.swift +++ b/Tests/PythonKitTests/PythonFunctionTests.swift @@ -204,7 +204,7 @@ class PythonFunctionTests: XCTestCase { // Example of function with no named parameters, which can be stated // ergonomically using an underscore. The ignored input is a [PythonObject]. - let testFunction = PythonFunction { _ in + let _ = PythonFunction { _ in throw HelloWorldException("EXAMPLE ERROR MESSAGE", 2) }.pythonObject