I'm not able to write a script that reduces a matrix to RREF in Python

Asked for help from an expert.If you have searched for a solution to the problem and found none, then you should(3) Proceed with caution and study more of the underlying theory.If you have asked for help from an expert, then you should(4) Continue to ask for help as needed and not get discouraged.If you have pursued any career other than the most menial and obvious, then you are doing well.
  • #1
1,082
90
Summary:: I'm not asking for help, but I'm asking for an opinion. Is this a sign that I probably should not be pursuing a career in software development or computer science?

I basically feel like this in general wrt any subject I am studying, really, whenever I feel stumped on a given problem. I feel like needing help on a problem in a given area of study is a sign that I probably shouldn't make that area of study the focus of my career, academic or otherwise. I don't know what to do with myself anymore.
 
Technology news on Phys.org
  • #2
If you make a habit of quitting whenever the journey ahead looks daunting, you will be unlikely to get very far.
 
  • Like
Likes dRic2, S.G. Janssens and Vanadium 50
  • #3
Most books on numerical linear algebra will explain that is it not at all easy to write a program that reduces an arbitrary numerical matrix to RREF in a reliable way. (For example, see Meyer's book, Matrix Analysis and Applied Linear Algebra.) Naively implementing the algorithm that you would normally carry out by hand is pretty much doomed to fail. If this is for a numerical LA course, go back to studying the book and persevere. If this is for another course, I would recommend using a canned routine instead of trying to write your own.

More generally, obviously you should not give up when a problem becomes difficult. There are so many other things you can do: let it rest and review it later, ask for help, consider special cases first, study more of the underlying theory, etc.
 
  • Informative
Likes berkeman
  • #4
Here we go again.

You've gotten a lot of advice, taken precious little of it, and are pretty much where you started. It's time to do something different.

My advice is to get a job as a patient care technician. They are plentiful, pay well at entry level, often come with signing bonuses, and the employer will train you. Do that for a year.

After a year of wiping people's butts, you will have found either your niche or your motivation.
 
  • Like
Likes Dr Transport
  • #5
As a self-taught programmer and software developer, I have asked for help countless times and it never made me feel "unworthy" or inept. Indeed, that's how you become a professional.

During your career you will inevitably come across new problems; some completely and others only superficially. It is your job to separate the two. Software development is pragmatic — if you can't solve a problem using the knowledge and skill you already possess, then it is necessary to obtain new knowledge and skill. And the only way to obtain new knowledge and skill is to ask for help, whether from a colleague, a textbook, PhysicsForums, or any other source of knowledge on the subject.

My opinion (since you're not asking for help): No, being unable to solve that specific problem is not a sign that you probably should not be pursuing a career in software development or computer science. However, if you're unable to ask for help when you need it, then you shouldn't pursue any career except the most menial and obvious.
 
Last edited:
  • #6
Eclair_de_XII said:
I basically feel like this in general wrt any subject I am studying, really, whenever I feel stumped on a given problem. I feel like needing help on a problem in a given area of study is a sign that I probably shouldn't make that area of study the focus of my career, academic or otherwise. I don't know what to do with myself anymore.
It depends. If you find yourself stumped on almost every single problem you encounter, then yes, the field likely isn't for you. If it's just an occasional occurrence, that's normal. No one does everything on their own, and I think you already know this. The real question is why you have such an extreme reaction: "I can't solve this homework problem. I must change my major!" I think you should talk with a therapist or counselor to understand what's going on with yourself.
 
  • #7
Eclair_de_XII said:
Summary:: I'm not asking for help, but I'm asking for an opinion. Is this a sign that I probably should not be pursuing a career in software development or computer science?

I basically feel like this in general wrt any subject I am studying, really, whenever I feel stumped on a given problem. I feel like needing help on a problem in a given area of study is a sign that I probably shouldn't make that area of study the focus of my career, academic or otherwise. I don't know what to do with myself anymore.
@Eclair_de_XII , with all due respect, you are behaving foolishly! Anyone who has studied anything at an advanced level has always felt stumped or needed help when studying or researching a new subject (yes, even the geniuses).

If you had a problem writing the script to reduce matrix to RREF in Python (or other problems), then you should have either

(1) Searched online on how to do this,
(2) Asked for help,
or
(3) Review what you have learned and figured out where you are having difficulty.
and
(4) Repeat steps (1)-(3).

The above steps are among the things you do to learn!

GET OVER IT!

[Aside (in case this statement is edited out): Is everyone in your family like you, giving up the moment something is difficult? Or is this somehow a thing in Hawaii, where you're from?]
 
Last edited:
  • Like
Likes Vanadium 50
  • #8
As usual, zero follow-up from the OP.

In the words of Yoda, "that is why you fail."
 
  • #9
Vanadium 50 said:
As usual, zero follow-up from the OP.

In the words of Yoda, "that is why you fail."
. . . and as usual (as you know), the response from the contributors may be helpful to other readers ##-## it looks like the OP's contribution was simply the question . . .
 
  • #10
S.G. Janssens said:
If this is for a numerical LA course, go back to studying the book and persevere. If this is for another course, I would recommend using a canned routine instead of trying to write your own.
This was for self-study. I saw some problems in a linear algebra book I'm reading for review. Then I thought that writing a script to row-reduce could be good programming practice for me, as opposed to reducing things in the usual way like I'd done during my undergraduate career. I thought it'd be less tedious and more interesting. I know there are modules that can row-reduce much more efficiently than I can, like that sympy module and its Matrix.rref method. But I just wanted to see if I was able to on my own.

scompi said:
I have asked for help countless times and it never made me feel "unworthy" or inept.
I have always had an irrational fear of asking for help from others, despite having done so many times during college. I just lose faith in myself whenever I must resort to seeking others for help. It makes me feel inadequate and strengthens a long-standing belief that I'm inferior to others.

scompi said:
However, if you're unable to ask for help when you need it, then you shouldn't pursue any career except the most menial and obvious.
I will keep this in mind.

vela said:
The real question is why you have such an extreme reaction: "I can't solve this homework problem. I must change my major!"
Being confronted with a problem that I'm unable to solve makes me question my worth as an individual. It makes me wonder what I'm good for.

StatGuy2000 said:
Is everyone in your family like you, giving up the moment something is difficult? Or is this somehow a thing in Hawaii, where you're from?
I barely know my family. I've no idea how they react when they are faced with a seemingly insurmountable challenge. I barely know anyone in this state. Most people don't like sharing details about themselves with me because I rarely seem to care, notice, or take any interest in them whatsoever.
 
  • #11
Eclair_de_XII said:
Being confronted with a problem that I'm unable to solve makes me question my worth as an individual. It makes me wonder what I'm good for.
You've already told us how you react. The question you need to answer is why you react this way so you can do something about it.
 
  • #12
Eclair_de_XII said:
Being confronted with a problem that I'm unable to solve makes me question my worth as an individual. It makes me wonder what I'm good for.
Really? That seems unrealistic and glum. Maybe you should consciously forego the unjustified elation of complacently feeling boundlessly competent, so that it's not a big letdown when reality intrudes to remind you that like everyone else, you can't solve every problem.
 
  • #13
vela said:
The question you need to answer is why you react this way so you can do something about it.
I don't feel comfortable answering this on a public forum. But thanks for the advice, besides.
 

1. Why am I having trouble writing a script to reduce a matrix to RREF in Python?

There could be several reasons for this difficulty. It could be due to a lack of understanding of the algorithm for reducing a matrix to RREF, a lack of familiarity with the syntax and functions in Python, or errors in the code itself. It is important to carefully review the algorithm and syntax, and to troubleshoot any errors in the code.

2. Are there any specific functions or libraries in Python that can help with reducing a matrix to RREF?

Yes, there are several functions and libraries in Python that can assist with reducing a matrix to RREF. The NumPy library, for example, has a built-in function called "rref()" that can be used for this purpose. It is important to research and familiarize oneself with the available functions and libraries before attempting to write a script.

3. What is the most efficient way to reduce a matrix to RREF in Python?

The most efficient way to reduce a matrix to RREF in Python would be to use built-in functions and libraries, such as the "rref()" function in NumPy. These functions are optimized and have been developed by experts, so they are likely to be more efficient than writing a custom script from scratch.

4. Can you provide an example of code for reducing a matrix to RREF in Python?

Sure, here is an example of using the "rref()" function from NumPy to reduce a matrix to RREF in Python:

# Import necessary libraries
import numpy as np
# Define a matrix
A = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
# Use rref() function to reduce matrix to RREF
rref = np.linalg.rref(A)
# Print the result
print(rref)

5. How can I troubleshoot errors in my code for reducing a matrix to RREF in Python?

To troubleshoot errors in your code, it is important to carefully review the syntax and logic of your code. You can also use tools such as debugging tools and print statements to help identify where the error is occurring. Additionally, researching and understanding the algorithm for reducing a matrix to RREF can help identify any errors in the code.

Suggested for: I'm not able to write a script that reduces a matrix to RREF in Python

Replies
2
Views
479
Replies
15
Views
1K
Replies
2
Views
815
Replies
3
Views
847
Replies
1
Views
524
Replies
4
Views
1K
Back
Top