Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4024108
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:40:51+00:00 2026-05-20T10:40:51+00:00

So I have a need to pass around a numpy array in my PyQt

  • 0

So I have a need to pass around a numpy array in my PyQt Application. I first tried using the new-style signals/slots, defining my signal with:

newChunkToProcess = pyqtSignal(np.array()), however this gives the error:
TypeError: Required argument ‘object’ (pos 1) not found

I have worked out how to do this with the old-style signals and slots using
self.emit(SIGNAL("newChunkToProcess(PyQt_PyObject)"), np.array([5,1,2])) – (yes, that’s just testing data :), but I was wondering, is it possible to do this using the new-style system?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:40:52+00:00Added an answer on May 20, 2026 at 10:40 am

    The type you’re looking for is np.ndarray
    You can tell this from the following code:

    >>> arr = np.array([])  # create an array instance
    >>> type(arr)           # ask 'what type is this object?'
    <type 'numpy.ndarray'>
    

    So your signal should look more like:

    newChunkToProcess = pyqtSignal(np.ndarray)
    

    (Notice I’m passing the type np.ndarray, rather than an array instance as you tried).
    If you don’t want to worry about the type of the argument, you could instead use:

    newChunkToProcess = pyqtSignal(object)
    

    This should let you send any data type at all through the signal.

    Also: numpy and Qt do not share any major functionality that I know of. In fact, the two are quite complementary and make a very powerful combination.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application in which I need to pass an array from C#
I have a java application I need to pass some info to a C++
I have a server script that I need to pass data to from the
So I have a flashobject which I need to pass a formatted DateTime string
I have a user control in a repeater that I need to pass data
I have a .NET program and a Borland Win32 program that need to pass
I have an ASP control custom built and I need to pass a value
I have a dict, which I need to pass key/values as keyword arguments.. For
I have some .net dll's and Exe's. I need to pass MSIL files to
In C++, if you need to have 2 objects modified, you can pass by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.