简体   繁体   English

嵌入式 Python 模块中可以有多个输入吗?

[英]Can I have multiple inputs in a Embedded Python Block?

I'd like to know If I could have an Embedded Python Block with multiples inputs?我想知道我是否可以拥有一个具有多个输入的嵌入式 Python 块? If the answer is yes, How could I get it?如果答案是肯定的,我怎么能得到它? Thank you谢谢

To have multiple inputs you need to add more elements to the in_sig parameter.要拥有多个输入,您需要向in_sig参数添加更多元素。 For example to have two complex inputs you need in_sig=[np.complex64, np.complex64]例如,要拥有两个复杂的输入,您需要in_sig=[np.complex64, np.complex64]

class blk(gr.sync_block):  # other base classes are basic_block, decim_block, interp_block
    """Embedded Python Block example - a simple multiply const"""

    def __init__(self, example_param=1.0):  # only default arguments here
        """arguments to this function show up as parameters in GRC"""
        gr.sync_block.__init__(
            self,
            name='Embedded Python Block',   # will show up in GRC
            in_sig=[np.complex64, np.complex64],
            out_sig=[np.complex64]
        )

See also 3.2.3.另见3.2.3。 Modifying the Python Block File . 修改 Python 块文件

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Python 中读取多行输入? - How can I read multiple line inputs in Python? 我可以使用bash脚本运行多个Python输入吗? - Can I run multiple Python inputs using a bash script? 如何将多个用户输入保存到 Python tkinter 中的变量中? - How can I save multiple user inputs into variables in Python tkinter? 如何创建一个带有两个参数的函数,它们都可以有多个输入或数据? - How can I create a function with two parameters which both can have multiple inputs or data? while 循环中的多个输入,以及 Python 中的 try-except 块 - Multiple inputs in while loop, along with try-except block in Python 我可以在破折号 plotly 回调中使用多个输入,但只有一个触发回调吗? - Can I use multiple inputs to my dash plotly callback, but only have one trigger the callback? 如何读取 python 2 中的多个输入 - How do I read multiple inputs in python 2 如何为 Python 中的多个不同输入提供相同的 output? - How to have the same output for multiple different inputs in Python? 在 Python 中,我嵌入了 2 组日期之间的 SQL 代码。 如何循环python代码以在日期之间运行多组 - In Python I have embedded SQL code with 2 sets of between dates. How to loop the python code to run multiple sets of between dates 如何在 Python 中获取“EOFEroor”,同时从用户那里获取多个输入? - How can I get "EOFEroor" in Python while taking multiple inputs from users?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM