简体   繁体   English

如何找到写入 python object 定义的文件和行号?

[英]How do I find the file and row number in which the definition of a python object is written?

Eg for:例如:

import numpy as np
x = np.array(1)

I know that the array function is part of the numpy module.我知道数组 function 是 numpy 模块的一部分。 However, numpy is quite big, hence is there a way to find the exact file where the array function is implemented?但是,numpy 相当大,因此有没有办法找到实现数组 function 的确切文件?

If you are using visual studio code.如果您使用的是 Visual Studio 代码。 Put the mouse one the word, press ctrl and click when it's blue.将鼠标放在单词上,按 ctrl 并在它变为蓝色时单击。

It works for me at least.它至少对我有用。

暂无
暂无

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

相关问题 如何在Python的CSV文件中找到特定项目的行号? - How do I find the row number for a specific item in a CSV file in Python? 如何在python中找到2个值中的哪一个更接近给定数字? - How do I find which of 2 values are closer to a given number in python? 如何找到Python stdout文件对象的位置? - How do I find the location of the Python stdout file object? 我如何总结python中写入文件中的给定数据 - How do I sum given data in written file in python 如何使用Python openpyxl查找每行Excel xlsx文件中的列数? - How do you find the number of columns in an Excel xlsx file per row with Python openpyxl? 如何在 Python 的文本文件中找到某个字符串的行号? - How can I find the row number of a certain string in a text file in Python? 如何计算输出文件中的字母N,该文件是写入txt文件的字符串列表? - How do I count the letter N in an output file, which is a list of strings written to a txt file? 如何在python中提取一行文件? - How do I extract a row of a file in python? Python如何查找列表中是否有数字,而不是列表的最后一个数字? - Python How do I find if an number is in a list but is not last number of the list? 我已经为数字的collat​​z模式编写了一个python代码,我想计算达到1所需的步骤数。我该怎么做? - I have written a python code for the collatz pattern for number and I want to count the number of steps it took to reach 1. How can I do it?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM